Adjusting the sails using the sheets is called trimming. You trim a sail to give it the best shape for the direction you are sailing relative to the wind.
Remember that the leading, vertical edge of the sail is called the luff. When a sail is trimmed perfectly, it is in tight enough that the luff is not shaking or flapping – but not so tight that the wind is simply blowing against one side, making the boat heel over excessively. If the sail is brought in almost tight enough, it will look good at the back edge but the luff will be shaking or not tight.
Examine this photo carefully and you’ll see the billowing back of the mainsail luff, which is more noticeable in the blue area of sail. See how it does not have a smooth airplane-wing shape near the luff? The movement or shaking of the luff that happens when the sail is not quite in tight enough is called luffing. Luffing means the sail is not working as efficiently as it should, and the boat is going slower than it can.
The general principle for trimming the mainsail perfectly is to let out the mainsheet until the mainsail begins to luff, and then pull it in just until it stops luffing.
Remember: if a sail is in too tight, it can look perfect. You can’t tell by its appearance if it is in too tight. The only way to know is to let it out until it starts luffing, then tighten it just until it stops luffing.