Fermentation usually occurs in absence of oxygen. Yeast and bacteria can convert sugars into alcohol releasing carbon dioxide in absence of oxygen. Also, fermentation occurs in some oxygen starved muscle cells (lactic acid fermentation) in animals.
In animals, aerobic respiration occurs which provides energy; however, in absence of oxygen, fermentation (lactic acid fermentation) occurs that produces lactate with no release of additional energy.