Cellular respiration is the grand scheme you are referring to here. This is a process conducted within the mitochondrion of animal cells that combines a simple sugar, glucose, with oxygen to produce carbon dioxide and water as waste products, while creating energy for the use of the cell's life functions, in the form of ATP (adenosine triphosphate).
The overall reaction looks like this:
C6H12O6 + O2 ---> CO2 + H2O + energy (ATP)
It is a fair estimate that 38 ATP molecules may be synthesized from one glucose molecule. In theory, that is; in reality, the number may be lower, due to faulty membranes and inefficient proton and electron transfer. Two molecules are formed from glycolysis, two more are formed from the Krebs cycle, while thirty-four are formed from the electron transport chain. ATP is synthesized primarily from ADP, adenosine diphosphate.