Organisms obtain energy in a process called cellular respiration. The function of cellular respiration is to harvest electrons from carbon compounds, such as glucose, and use that energy to make ATP. ATP is used to provide energy for cells to do work.
The overall chemical equation for cellular respiration is:
C6H12O6 + 6O2 --> 6CO2 + 6H2O + energy (ATP)
Glucose and oxygen are used to create carbo dioxide, water, and energy for the cell in the form of ATP. The equation for cellular respiration is the opposite of the equation for photosynthesis.