When you get the hang of what the wind is up to despite your boat's forward velocity based on what it feels like and the look of the waves and breakers etc.
Just like an aircraft, you need to consider three axes of rotation - nominally: roll, pitch and yaw and three vectors for direction of travel. Then you need to worry about propulsion. An aircraft provides its own farts. A sailing boat flies or is pushed or a combination of those.
A Bermuda rig - two triangles one in front and one behind the mast, basically "flies". The front sail - the "jib" provides some lift and also steadies the airflow over the main sail.
A square rig - think Santa Maria, HMS Victory, Vasa etc generally rely on being pushed. They will probably also have staysails with very complicated names and the like that work in the same way as jibs. Also gaff rigs, Arab dhows, Junk rigs and more ways of using the wind.
In the end the helm needs to feel the wind and work out what to do with it - that's why the ship's wheel on sailing vessels is not enclosed (that would be insane).