Fermentation is a natural process where yeast converts sugar into alcohol and carbon dioxide (CO2). In the brewing process, fermentation converts the sugars produced in the earlier mashing step into alcohol. Since CO2 is a byproduct of fermentation, it is also used for the natural carbonation of many homebrewed beers. After fermentation, beer is bottled or kegged for consumption. The study of the chemistry of fermentation is called Zymurgy. Human controlled fermentation dates back to the dawn of civilization - evidence dating back to 5400 B.C. has been found of people creating wine.
Primary fermentation starts when yeast is added to the wort right after the boiling and cooling steps. Once the yeast is added, we call the mixture beer as opposed to wort. The primary, or active fermentation process typically takes 3-5 days during which the bulk of fermentable sugars are converted into alcohol and CO2. During this phase, CO2 production is strong, often producing a foamy head on the top of the beer called kraeusen.
Brewers often transfer the beer to a secondary fermentor to separate the beer from inactive yeast, proteins, tannins, hops and other products that precipitate out of the beer and form a sediment at the bottom of the primary fermenter. A secondary fermentation of 5-14 days allows fermentation to complete and also lets additional tannins, proteins and yeast to fall out of the beer. This aids in clarifying the beer and reducing sediment in the final keg or bottle.
Conditioning and Filtering
Commercial brewers will often move the beer to a third vessel at this point and cool the beer to near freezing, which encourages more yeast and sediment to precipitate from the beer, improving flavor and aroma. Many homebrewers making lager will also condition their beer by lagering (aging) it at various cold temperatures for several weeks before bottling. Commercial beers are then filtered to remove all remaining yeast and sediment before bottling. Most homebrewers do not filter their beer, as some yeast is needed for natural carbonation of the beer.