Getting boat off a dock is not a difficult task, fi you know how to do it. It sounds not complicated, but there are some details that one keeps on mind in order to not have any kind of accident. The best occasion to undock your boat is when the wind is moving parallel to the dock. If it is windy or adverse current, this task will turn more difficult. Then you simply need to use good fendering and a spring line. You should use the spring line on the opposite end of the oncoming wind. It means, if your vessel is into the wind, you should put a spring line from your aft cleat. Then you must go forward on the dock. This action only release the bow line and hit reverse a bit and the bow will swing out. One you do this step, you should put your motor forward and retrieve your aft spring line.
Getting boat off a dock is harder when the wind is perpendicular to the dock. If you are in this situation, you should spring your bow line. You must not forget to use hard rudder in the direction that kicks your stern away from the dock. You must reverse rudder, engine and retrieve your bow spring line, once the stern is far enough to clear.
Whatever the wind direction and weather condition are, you should drive carefully to get your boat off the bock. Many boaters damage their boats by doing bad sail maneuvers. You should always try to sail carefully.