While all cells undergo cellular respiration - the process by which energy is released from food and converted into a form that can be used in bodily processes - anaerobic respiration takes place in the absence of oxygen. Anaerobic respiration is therefore the counterpart to aerobic respiration, which occurs when there is oxygen available.
Many bacterial cells solely engage in anaerobic respiration, whereas eukaryotes (such as humans) only use aerobic respiration when there is a lack of oxygen available to them. Both processes, however, produce adenosine triphosphate (ATP): the energy molecule that is central to all bodily functions and essential to maintain life. Both types of respiration begin with glycolysis, which breaks down glucose (a common sugar) and creates pyruvate, producing two molecules of ATP in the process. Anaerobic respiration then breaks into two different pathways, both of which are types of fermentation. In one, ethanol is produced, while lactic acid is produced in the other. (Lactic acid production is what creates muscle pain during exercise, when the body runs out of oxygen and must resort to anaerobic pathways.) Both of these pathways are different ways of producing NAD+, an electron acceptor and donor that helps produce another two ATP molecules. On the whole, anaerobic respiration is much less efficient than aerobic respiration, as the former produces two ATP molecules compared to the latter's 36 to 38 molecules.