This is a fairly detailed but simple explanation of the benifits of secondary fermentation:
The term "secondary fermentation" is a little misleading. The beer does most or all of the actual fermenting in the primary fermentor. Primary fermentors are made of either plastic or glass. Many recipes can be made using only a primary fermentor - this is called single-stage fermentation.
Other beers are better with 2-stage fermentation, and you can use 2-stage fermentation all the time if you prefer. After fermenting for a while in the primary fermentor, the beer is transferred into a secondary fermentor.
Important Note: Primary fermentors can be either plastic or glass. However, for secondary fermentation you really should have a 5-gallon glass carboy. That's because It is very important that there's no extra air space in your secondary fermentor! And glass is best because it doesn't allow oxygen to pass through it, like some plastic does. So for secondary fermentors, always use the appropriate size glass carboy, never a bucket or a too-large carboy.
Why use a secondary fermentor?
First, because the beer will be clearer when you bottle it, so there will be less sediment in the bottles. This is because the beer has a chance to settle again in secondary. There will always be a little bit of sediment in the bottles when using the natural carbonation methods popular with home brewers.
Second, because fermentation will be faster and more complete when using two fermentors.
Fermentation starts out quite vigorously, and then gradually tapers to a stop for a few days. After the peak of fermentation, inactive spent yeast settles to the bottom of the fermentor. This inactive yeast actually inhibits the yeast that is still active and trying to finish the fermentation.
When you rack your beer (transfer to a secondary fermentor) you leave the inactive yeast behind, and the physical motion of the beer drives some of the dissolved CO2 out of solution. This re-invigorates the fermentation, so that it finishes faster, and the beer will have fewer off-flavors. This is more important with very strong beers, and with many lagers.
Third, because you can leave your beer in secondary much longer than you can in primary.
If you leave your beer in primary for more than 2 weeks, all of the settled yeast starts to autolyze, which means the stronger yeast cells start cannibalizing the weaker ones. This gives you harsh yeast bite in the finished beer. But when you rack to secondary, most of the yeast gets left behind, so it is safe to let the beer settle and age after fermentation is complete.
This is useful for stronger beers that need aging to mellow their flavor, and for making lagers, in fact, the word lager means to lay down (i.e.: to age).