Cellular respiration harvests chemical energy from organic compounds like glucose to produce ATP. It occurs in three main stages: glycolysis, the Krebs cycle in the mitochondria, and the electron transport chain. During these stages, electrons are transferred through electron carriers like NADH and FADH2 to oxygen, releasing energy used to synthesize ATP through oxidative phosphorylation. The overall reaction oxidizes glucose and reduces oxygen to produce carbon dioxide, water, and 38 ATP per glucose molecule. When oxygen is limited, fermentation allows glycolysis to continue by reducing pyruvate to ethanol or lactic acid instead of entering the Krebs cycle.