This Boat-Ed safety course video discusses the techniques for casting off a boat from a dock under various wind conditions.
Before you cast off, keep your boat tied to the dock while you warm up the engine and be sure it's running properly. Make sure everyone on board is seated and wearing a life jacket. Then check the departure area for traffic. Now, you're ready to cast off.
If there's no winder current, cast off the bell and stern lines. Shift into forward and slowly accelerate; gradually turning your bell away from the dock.
If the winder current is pushing your boat toward the dock, cast off the stern line. Then move and secure the bell line to a mid-boat position on the dock. Shift into forward and turn the stirring wheel hard toward the dock. Increase your speed slowly until the stern's well away from the dock. Then cast off the bell line. Back out slowly until you have room to shift into forward and turn away from the dock.
If the winder current direction is away from the dock, cast off the bell and stern lines. If needed, use a paddle or boat hook; to keep the boat clear of the dock. Let the wind or current carry the boat away from the dock. Once you're clear; shift into forward and slowly leave the area.