Aerobic respiration is essentially (but not exactly) the reverse reaction of photosynthesis.
While photosynthesis takes in water and carbon dioxide to release oxygen and create glucose, aerobic respiration used this glucose and some oxygen to create ATP (adenosine triphosphate, or energy molecules), releasing back water and carbon dioxide.