Sailing works on the standard WSAD keys.
W = Raise Sails
S = Lower Sails
A = Left Rudder
D = Right Rudder
Each ship can have a different "Best Point" which means it will be fastest at its best point. For example a Bermuda Sloop has a best point of 90 degrees which means it will reach its fasted speed when it heading 90 degrees from the wind (Beam Reach).
Here is an example of a Wind Circle in the game.
The following terms are used to describe the wind.
Depending on the situation you find yourself in you might not always want to go at you best point. Some ships perform much better at close haul than other ships so that might be a way to escape a dangerous situation. Be sure to understand the sailing characteristics or each ship you sail.
You can select what task you want your crews to focus on these are:
Crew Focus - Sailing
Crew Focus - Maneuver
Crew Focus - Maneuver