Cellular respiration involves the breakdown of glucose to produce energy in the form of ATP. It occurs in both plants and animals and takes place in three main stages: glycolysis, the Krebs cycle, and the electron transport chain. Glycolysis breaks down glucose and occurs in the cytoplasm, producing a net gain of 2 ATP. In the presence of oxygen, glycolysis is followed by the Krebs cycle and electron transport chain, where more ATP is produced. Without oxygen, fermentation occurs instead to regenerate NAD+ and allow glycolysis to continue.