is called a stern rudder i looked every word up on my paper and found it
a Lateen Sail
ships could sail against the wind.
Allegedly, the lateen sail design made it possible to sail closer into the wind. That is, less than 45 degrees from the direction the wind is blowing. No sail boat can sail directly into the wind. Yet.
Caravels are ships! They used triangular sails that, unlike traditional square sails, allowed ships to sail against the wind. By replacing oars on the ship's side with rudders at the back of the ship, the Portuguese also greatly improved steering.
the reason why caravels could sail against the wind is because they had a very big triangular cloth which would let them flow with the wind
the caravel has triangular sails as well as square sails. Square sails carried the ship forward when the wind was at its back. Triangular sails allowed the caravel to sail into the wind. the caravel was better than other euoopean ships of the time at this type of sailing
Wut made ships sail in the wind was that using a persicet sail or flag will pick up the wind and will push the air out and sail..just like u swinging on a swing 
Lateen Sails
It is not possible to sail directly INTO the wind. Forty-five degrees is about as close as can be gained. Actually they did get the ships to sail into the wind. The above answer is wrong.
In the ancient world the square sail on "square rigged ships" was employed universally in the Mediterranean on the seagoing ships of the Egyptians, Phoenicians, Greeks and Romans. In Hellenistic and Roman times a spritsail (triangular sails) was sometimes set on a small raking foremast, known as an artemoon, in order to sail with a beam wind.
A three sided sail is known as a Lateen sail or also a triangular sail. With a four sided sail one is only able to sail against the wind, but with a Lateen sail it is possible to sail more directly into the wind.
No sailing ship can sail directly into the wind. However by rigging the sails correctly the vessel can be made to sail more closely to the wind.