You (and most other animals) breathe to exchange gases in your lungs. The cells in your body take in and use oxygen (O2) and they give off carbon dioxide (CO2). Oxygen constitutes about 20% of the air we breathe and is produced by plants and other photosynthetic organisms from CO2 and water (H2O).
Your lungs take in air by the downward motion of the diaphragm muscle under your lungs. This creates a temporary vacuum that is filled with air. The tubes of your lungs (bronchi and bronchioles) become smaller and smaller, like the branches of a tree. Finally the air arrives in the alveoli, where gases can exchange with the blood in the small capillary blood vessels at the alveoli. During gas exchange, carbon dioxide in the blood is exchanged with oxygen in the air. The CO2 and O2 are carried in the blood by a protein called hemoglobin, which is in your red blood cells. When you exhale, the diaphragm pushes the exchanged air (with CO2) out of your lungs.
One result of not breathing properly is that you don't remove CO2 from your blood. The extra CO2 can react with water to form carbonic acid. This can make your blood too acidic with dire consequences.
Cells use the oxygen to produce chemical energy in the form of a molecule called adenosine triphosphate (ATP). When one of its phosphate groups is removed, there is release of large amounts of energy, enough to form new chemical bonds, or do other cellular work. You can think of ATP as money (cash), in that it is immediately available. Other molecules that store energy, such as glycogen or fat, would be like a certificate of deposit - not so readily available when you need it.
The main pathway to producing ATP using oxygen involves the breakdown of the sugar glucose. This is called cellular respiration, and it occurs in many steps, resulting in the production of CO2 and water. The overall equation is:
Sugar + Oxygen -> Carbon Dioxide + Water or
C6H12O6 + 6 O2 -> 6 CO2 + 6 H2O .
Thus, we use sugar and oxygen to produce CO2 and water, whereas photosynthetic organisms (plants) use CO2 and water to produce sugar and oxygen - a nice balance of nature. The ultimate source of the energy to produce sugar comes from the sun (light energy, thus, photosynthesis).
Glucose is a sugar molecule with six carbon atoms, along with oxygen and hydrogen atoms. The first series of steps in its breakdown is called glycolysis (glyco- is a prefix for sugar and lysis means breakdown). These steps occur in the cytoplasm of your cells. Glycolysis converts glucose from a six-carbon sugar to two three-carbon molecules. Each of the three-carbon molecules (pyruvate) is converted to a two-carbon molecule, releasing one of the three CO2 molecules that are ultimately produced per pyruvate. This conversion and the subsequent steps are performed in the mitochondria of your cells. Mitochondria are organelles inside your cells responsible for energy production. They have an outside membrane and an inside membrane.
The two-carbon molecule enters the next phase of the breakdown called the citric acid cycle or Krebs cycle. During this cycle, the two-carbon atom molecule is modified on a series of carrier molecules to produce the rest of the CO2 molecules. More importantly during the Krebs cycle there is a transfer of electrons to an electron carrier molecule called NADH, along with protons (hydrogen atoms with electrons removed).
The electrons are transported to a series of carrier proteins called the electron transport chain, which extracts the energy from the electrons, gently lowering their energy until they reach their ultimate goal of combining with oxygen and protons to form water. This electron energy is used to transport the protons to one side of the internal membranes of the mitochondria, where they get stuck. The protons reach a membrane enzyme that allows the protons to come through, and this energy is used to synthesize new ATP.
Thus, your cells use oxygen to break down sugar to carbon dioxide and water. This process gives your cells the energy they need to do their work. The energy is derived from the chemical bonds in the glucose molecule. Oxygen and carbon dioxide (and some water vapor) are the gases that are exchanged in your lungs.
Source: Campbell, et al, Biology, 8th edition, c. 2008.