The chilled wort is transferred into a tank called the fermenter. Yeast is added. The yeast converts sugar produced by the mashing process into ethanol and carbon dioxide:
C6H12O6 (sugar) -> 2C2H5OH (ethanol) + 2CO2 (carbon dioxide)
The fermentation reaction produce heat, which the fermenter must be equipped to remove.
In addition to the main reaction, fermentation produces a variety of side products that can affect the flavor of the beer. Different fermentation conditions and strains of yeast yield different flavor profiles.
To make lager beer, the fermentation temperature is controlled below 60 F (16 C). Ale is fermented above 60 F. Different species of yeast are used in these temperature regions.
This topic is covered in The Chemistry of Beer: The Science in the Suds, Chapter 9.