Fermentation is generally any metabolic process where an enzyme produced by a microorganism catalyses the conversion of one substance to another with the evolution of CO2 for example yeast is used to convert sugar to alcohol or acetic acid with the emission of CO2 (but before fermentation takes place one molecule of glucose breaks down to two molecules of pyruvic acid).Fermentation also occurs in oxygen-deficient muscle cells, for example, C6H12O6 →2CH3CHOHCOOH. Most common types of fermentations are alcoholic and lactic acid fermentation.

Fermentation converts NADH and pyruvate produced during glycolysis into NAD+ and an organic product. In the presence of oxygen, NADH and pyruvate are used to generate ATP in respiration. This process is known as oxidative phosphorylation, and it generates much more ATP than glycolysis alone. For that reason, fermentation is rarely utilized when oxygen is available. The exception being obligate anaerobes, which cannot tolerate oxygen.
The first step, Embden-Meyerhof-Parnas glycolysis, is common to many fermentation pathways:
               C6H12O6 + 2 NAD+ + 2 ADP + 2 Pi → 2 CH3COCO2− + 2 NADH + 2 ATP + 2 H2O + 2H+
Pyruvate is CH3COCO2−. Pi is inorganic phosphate. Two ADP molecules and two Pi are converted to two ATP and two water molecules via substrate-level phosphorylation. Two molecules of NAD+ are also reduced to NADH.
In oxidative phosphorylation, the energy for ATP formation is derived from an electrochemical proton gradient generated across the inner mitochondrial via an electron transport chain. Glycolysis has substrate-level phosphorylation.

Alcoholic fermentation: The end product of alcoholic fermentation is ethanol. Yeast, most commonly Saccharomyces cerevisiae is used for the production of alcohol. Yeast is usually aerobic but interestingly they can also grow as facultative anaerobes and this is important because when the yeast cells are grown aerobically the alcohol production falls dramatically, this inhibiting effect of oxygen is called Pasteur effect. Conversion of pyruvic acid to ethanol happens in two steps: pyruvic acid to acetaldehyde and acetaldehyde to ethanol. The first step is catalyzed by pyruvic acid decarboxylase which requires TPP as a coenzyme, and the second step by alcohol dehydrogenase which requires NADH2 as coenzyme.

Lactic acid fermentation: Lactic acid bacteria are mainly employed to produce different kinds of fermented foods. The bacteria ferment the milk sugar lactose to produce lactic acid which results in curdling of milk protein. Various species are used to yield products of different consistency, taste, and aroma. In different countries the products are variously known as yogurt in Europe and America, dadhi or dahi in India, Kefir in Russia, Kumiss, buttermilk, acidophilus milk etc. Lactic acid bacteria are also used in producing fermented vegetable products for example sauerkraut (fermented cabbage), cucumber pickles and fermented olive. It is of two types 1) homolactic and 2) heterolactic fermentation

Homolactic: In this type lactic acid is produced as the only product by the reduction of pyruvic acid with the help of enzyme lactic acid dehydrogenase without the evolution of CO2 and this is the unique feature amongst all the fermentation processes. It is also the simplest of all fermentation as it involves an only single step in the conversion of pyruvic acid into lactic acid.

In muscle cells, the same reaction occurs during the deficiency of oxygen to produce lactic acid.
Heterolactic: bacteria that carry out the heterolactic fermentation lacks two important enzymes of glycolytic pathway aldolase and triose phosphate isomerase which makes them use alternative pentose phosphate pathway where xylulose 5- phosphate is the intermediate product and these bacteria have the enzyme pentose phosphate ketolase to break down this intermediate product.