Whether you're racing in a triathlon or doing something less strenuous, you need to breathe in oxygen to help you get energy and breathe out carbon dioxide, a waste product. When you inhale, your diaphragm and rib muscles contract, increasing the volume of your lungs. When you exhale, these muscles relax, decreasing the volume of the lungs. When the lungs expand, air pressure in the lungs drops, causing air to flow into the lungs When lung volume decreases, air pressure increases, causing air to flow out of the lungs. Air enters the nose or mouth, moves down the trachea, and goes into the two bronchi. Air moves down smaller and smaller bronchioles until it reaches a tiny sac -- an alveolus. Each alveolus is surrounded by capillaries. Oxygen diffuses from the alveolus to the blood, and carbon dioxide diffuses from the blood to the alveolus. As blood flows through the capillary, it becomes rich in oxygen. In the blood, oxygen diffuses into a red blood cell and binds to hemoglobin, a protein made up of four subunits. One oxygen molecule can bind to each subunit. Oxygen-rich blood flows from the lungs to the heart, which pumps this blood to capillaries all over the body. Here, we see oxygen diffusing from a capillary's red blood cells into a muscle cell. Oxygen is used by the cell's mitochondria to produce ATP during cellular respiration. Carbon dioxide is released. How does carbon dioxide leave the body? Carbon dioxide diffuses from cells into capillaries. Some carbon dioxide stays in the plasma, the liquid part of the blood. Most carbon dioxide, however, enters red blood cells. Some carbon dioxide binds to hemoglobin. The rest is converted to bicarbonate, which diffuses into the plasma. This oxygen-poor blood flows back to the heart, which pumps it to the lungs. There, carbon dioxide diffuses from the plasma into the alveolus. Bicarbonate enters red blood cells and is converted back to carbon dioxide. Carbon dioxide is also released from hemoglobin. Carbon dioxide diffuses out of the red blood cells, into the plasma, and into the alveolus. When you exhale, air flows out of your lungs. And that's how you release carbon dioxide, get oxygen, and keep on running.