A sailing vessel moves forward in reaction to air moving on its sails.
Sails are airfoils that work by using an airflow caused by the wind and the motion of the boat. In sailing the combination of the two is known as the 'apparent wind.' It is the wind as experienced by a sailor on a moving vessel... the velocity of the wind relative to the boat's motion. Sails generate lift using the air that flows around them, in the same way as an aircraft wing generates lift.
Apparent wind differs in speed and direction from what is known as the 'true wind' that is experienced by a stationary observer on land.
So the air flowing at the sail surface is not the true wind. Sailing into the wind causes the apparent wind to be greater than the true wind. Also, the direction of the apparent wind will be forward of the true wind. Some high-performance boats are capable of travelling faster than the true wind speed on some points of sail.
The energy that drives a sailboat is harnessed by manipulating the relative movement of wind and water speed. If there is no difference in movement (e.g. on a calm day or when the wind and water current are moving in the same direction at the same speed) there is no energy to be extracted and the sailboat will not be able to do anything but drift. Where there is a difference in motion, then there is energy to be extracted at the interface, which the sailboat does through its sail(s) in the air and its hull(s) in the water.
The sailing vessel is not manoeuvrable with the sail alone. The torque caused by the sail lift would cause the vessel to twist instead of move forward. In the same manner that a plane requires an elevator with control surfaces, a boat requires a keel and rudder. The sail alone is not sufficient to drive the boat in any desired direction. Sailboats overcome this by having another physical object below the water line... such as a keel, centreboard or some other form of underwater foil, even the hull itself (as in catamarans without centreboard or in a traditional multihull sailing vessel known as a proa). Thus, the physical portion of the boat that is below water can be regarded as functioning as a 'second sail.'
Having two surfaces against the wind and water enables the sailor to travel in almost any direction and to generate an additional source of lift from the water. The flow of water over the underwater hull portions creates a hydrodynamic force. The combination of the aerodynamic force from the sails and the hydrodynamic force from the underwater hull section allows motion in almost any direction except straight into the wind. This can be compared, in simple terms, to squeezing a wet bar of soap with two hands, causing it to shoot out in a direction perpendicular to both opposing forces.
Depending on the efficiency of the rig, the angle of travel relative to the true wind can be as little as 35 deg or greater than 80 deg. This angle is called the 'tacking angle.' Tacking is essential when sailing upwind. The sails, when correctly adjusted, will generate aerodynamic lift. When sailing downwind, the sails no longer generate aerodynamic lift and airflow is stalled, with the wind push on the sails giving drag only. As the boat is going downwind, the apparent wind is less than the true wind and this, allied to the fact that the sails are not producing aerodynamic lift, serves to limit the downwind speed.
Some non-traditional rigs are designed to capture energy from the wind in a different fashion and are capable of feats that traditional rigs are not, such as sailing directly into the wind. One such example is the wind turbine boat, also called the 'windmill boat.' It uses a large windmill to extract energy from the wind, and a propeller to convert this energy to forward motion of the hull. A similar design, called the 'autogyro boat', uses a wind turbine without the propeller, and functions similar to a normal sail. A more recent development is a cart that uses wheels linked to a propeller to 'sail' dead downwind at speeds exceeding wind speed.
Wind shear affects sailboats in motion by presenting a different wind speed and direction at various heights along the mast. Wind shear occurs because of friction above a water surface slowing the flow of air. Thus, a difference in true wind creates a different apparent wind at different heights. Sail makers may introduce 'sail twist' in the design of the sail, where the head of the sail is set at a different angle of attack from the foot of the sail in order to change the lift distribution with height. The effect of wind shear can be factored into the selection of twist in the sail design, but this can be difficult to predict since wind shear may vary widely in different weather conditions. Sailors may also adjust the trim of the sail to account for wind gradient, for example, using a boom vang.