Secondary fermentation is the process of transferring your beer to a secondary fermentation vessel to allow the beer to complete its fermentation cycle and condition in a clean environment. The primary reason for a secondary fermentation is to improve the taste of a beer. Towards the end of the primary fermentation, much of the yeast, beer solids, and hop solids will fall out of the beer and form sediment on the bottom of the fermenter. If left in contact with the beer too long, the dead yeast and solids can impart off or undesirable flavors upon the beer. For this reason, many brewers choose to rack the beer off of the sediment into a secondary fermenter to allow the beer to finish out fermentation, clarify, and condition.
The need for secondary fermentation is somewhat dependent on the style and characteristics of the beer that you are creating. For instance, if I am brewing an American wheat hefeweizen, I probably will not go through the trouble of a secondary fermentation because it is a relatively low alcohol beer with a low flocculating strain of yeast. This means it will ferment quickly, so the beer is only in contact with the sediment for a short period of time, and much of the yeast will remain in suspension with this style of beer, so a yeasty taste and cloudy appearance is appropriate.
If I was brewing an IPA with a high starting gravity, and I wanted to highlight the hoppy flavor of the beer, I would certainly conduct a secondary fermentation to remove as much yeast and yeast flavor from the finished beer to help both with taste and clarity. Depending on the beer style, gravity, fermentation temperatures, yeast strain, and yeast health, a secondary fermentation can typically last anywhere from two weeks to several months. When conducting a secondary fermentation on certain beers, such as sours, the secondary fermentation can in some cases last over a year.
An imperial chocolate stout being racked into a secondary fermentation carboy,