Racking is the term brewers use to describe transferring wort or beer from one vessel to another. Racking is typically done through the use of a siphon. Thos who have fermenters with a tap can also use hosing.
 Reasons for racking
There are three main reasons for racking. Firstly, if you wish to ferment your beer longer than say 10 days, moving the beer off the yeast cake will reduce the risk of autolysis, a process whereby yeast cells, having consumed all other available food, begin to metabolise each other, creating a foul taste. Secondly, the time spent in the secondary gives the beer time to clear, as solids in the beer settle out. Thirdly, the time the beer spends in the secondary fermenter is a period during which the beer matures and the flavours smooth out. A period of time maturing in a fermenter is more beneficial than maturation in a bottle, as larger volumes make maturation easier and more effective.
Additionally, racking is the most common ways to do bulk priming. Bulk priming is where you dissolve a measured amount of sugar into your fermented beer just prior to bottling in order to achieve consistent and accurate carbonation in every bottle regardless of bottle size. It has the additional bonus that you don't have to stuff about priming every bottle individually. By racking onto your sugar you avoid stirring up the trub, as you would if you tried to stir the sugar into the primary (or secondary) fermenter.
Racking is quite simple. After washing and sanitizing your second vessel, use either a sanitised hose or racking cane and transfer the liquid from the first to the second. You can do this by attaching one end of the hose to the fermenter tap and the other to the tap of the racking vessel, although there are some concerns about this causing unnecessary splashing. See further down in the article for an alternate method. Keeping the racking vessel above the fermenter, open both taps. Slowly lower the racking vessel, keeping it tilted towards its tap so that the beer pools around the tap and does not splash. Splashing can oxidize your beer and over time it may develop stale flavours often described as being like cardboard or sherry. As the beer drains out of the fermenter, allow the bulk of the yeast cake to remain behind. Once this is done, seal up the racking vessel and store it a constant temperature within the appropriate fermentation temperature range.
 Alternate Method
Place the full fermenter above the empty vessel (ie, full fermenter on a bench, empty one on the floor). Attach your racking hose to the tap of the full fermenter and ensure that you have enough hose to reach right into the bottom of the fermenter and make a coil along at least part of the vessel wall.
Making such a coil will minimize splashing as the liquid flow is not restricted, and has the additional benefit of creating a slight gentle stirring action which is great for mixing bulk priming sugars through a batch.
Before opening the tap, hold up the hose so as little of possible of it is hanging below the tap. Open the tap slowly until it is fully open, and allow the wort to fill the hose up to to liquid level of the full fermenter. Doing this will remove any air bubbles that can occur in the tap.
So now you're standing there with a hose full of wort and an open tap. The next step is to get the hose down into the bottom of the empty vessel and create the previously mentioned coil. You want to do this quickly, to prevent the air in the end of the hose from bubbling back up into your wort. I find the best way to do this is to put your thumb over the end and then plunge you hand to the bottom of the empty fermenter and let go. The remainder of the hose should fill with wort and quickly flow into the second vessel.
 Concerns about racking
Many brewers consider racking to be an unnecessary step that exposes your beer to needless risks of infection and oxidation. In the experience of many brewers, you can leave your beer on the primary yeast cake for 3-6 weeks without it developing off flavours provided that the beer is kept at or below fermentation temperatures. This longer period seems to particularly help in fermenting beers brewed with malt extract (as opposed to all-grain beers) as the longer period on the yeast cake helps to ferment out the beers and clean up some untidy flavours. Racking your beer will tend to rob you of the last point or two or attenuation. Some brewers rack too early and the fermentation process gets stuck entirely.
If you wish to truly lager a beer then you will need to rack it to a racking vessel or keg. Lagering the beer involves storing it at temperatures below 5°C (41°F) for up to six months.