Evolution produced the processes of anaerobic and aerobic respiration, including the breakdown of glucose, known as glycolysis. According to the Theory of Endosymbiosis, mitochondria are descended from bacteria that were engulfed by the ancestors of Eukaryotes.
The ability to extract energy from glucose, which cells can obtain from the external environment or, in many cases, produce from other compounds, emerged very early in evolution. Evolution created the core reaction for this breakdown, glycolysis, long before photosynthesis. Like glycolysis, photosynthesis emerged roughly 3.5 billion years ago, either on Earth, or in organisms which arrived on Earth via a transpermia scenario, then went through more evolution. Whatever the origin of Earth's biota, it would take roughly 1.5 billion years for the seas and atmosphere to evolve any appreciable amount of oxygen. Thus, even complex Eukaryotes, including animals, are capable of respiration without oxygen, through anaerobic glycolysis. However, when combined with other processes that use oxygen, breakdown of sugar beginning with glycolysis produces much more energy.
In the case of a human being, or other animal organism, the substrate entering glycolysis is glucose 6-phosphate (G6P), which in turn has been produced from glucose to allow it to enter the cell. Alternatively -and this is very important in exercise- G6P can be produced from glycogen, a molecule which stores many units of glucose as branched chains. If beginning with glycogen in muscle, one extra molecule of ATP is energized per molecule of glucose, because the uptake of glucose and conversion to G6P, which uses one molecule of ATP, has taken place already. In liver cells, because a slightly different enzyme is used, called glucokinase, the yield is still higher. If beginning with molecule of glucose, from outside of the cell, two molecules of ATP are consumed and four are produced, resulting in a net yield two new molecules of ATP produced through glycolysis, without using oxygen. In the end of the glycolytic process, the 6-carbon structure of G6P is split into two molecules of the three-carbon compound pyruvate. Through an additional reaction, associated with but not part of glycolysis, one of the three carbons of each pyruvate is broken off, resulting in the production of carbon dioxide (CO2).
Oxidation is defined as the loss of electrons; reduction is defined as the gain of electrons. When one molecule of G6P is broken down, electrons must be drawn away and accepted by a carrier. In glycolysis, the compound NAD+ plays this role and is thus converted to NADH, a more reduced compound. There is a limited supply of these compounds, however. Thus, if NAD+ is not replenished, glycolysis will stop. One way of re-oxidizing NADH is through oxidative metabolism by way of electron transport, which in Eukaryotes takes place within mitochondria.
According to the Theory of Endosymbiosis, mitochondria are descended from bacteria that were engulfed by the ancestors of Eukaryotes. Mitochondria have their own DNA, known as mitochondrial DNA (mtDNA). Analysis of sequences of mtDNA show a common ancestry in evolution between mitochondria and a class of aerobic bacteria, known as alpha-proteobacteria, a beautiful example of the evolution of basic cellular machinery.
When NAD+ is replenished through electron transport, respiration is called aerobic respiration. However, when there is not enough time to replenish NAD+ by way of aerobic respiration, anaerobic respiration begins. In this case electrons are from NADH are transferred to the product of glycolysis, which is called pryruvic acid, which through reduction becomes lactic acid. In certain microorganisms, however, instead of lactic acid, alcohol can be produced as a means of re-oxidizing NADH to NAD+.
As cellular metabolism continues, products of glycolysis, the breakdown of sugar, move into mitochondria, where oxidative phosphorylation takes over, by means of the electron transport chain (ETC). The ETC is a series of proteins and other compounds which "accept" electrons, gradually, until finally they are transferred to oxygen, resulting in the production of water and much more ATP than is produced from glycolysis alone. Biophysically, glycolysis, cellular respiration (via oxidative phosporylation), and intermediate set of reactions, called the Krebs Cycle constitute a process which is the opposite of photosynthesis. Overall in the process, 36 molecules of ATP are produced for each molecule of glucose entering a muscle cell. In the case of a liver cell, 38 molecules of ATP are produced for each molecule of glucose.