Breathing: You breathe in air through your nose or mouth. This air travels down your windpipe and into your lungs.
Gas exchange in the lungs: Tiny air sacs in your lungs called alveoli are surrounded by capillaries, which are very small blood vessels. Oxygen from the air in the alveoli diffuses, or moves, across the thin walls of the alveoli and into the capillaries. At the same time, carbon dioxide diffuses from the capillaries into the alveoli.
Transport of gases in the blood: Red blood cells carry most of the oxygen throughout your body. They have a protein called hemoglobin that grabs onto oxygen molecules. A smaller amount of oxygen dissolves directly in the blood plasma. Carbon dioxide is transported in the blood in a few different ways, but most is converted into a bicarbonate ion which is then carried in the blood plasma.
Exhaling: You breathe out, expelling carbon dioxide-rich air from your lungs.
The exchange of gases happens because of differences in pressure. Oxygen enters the bloodstream because there's less oxygen in the blood than in the alveoli. Carbon dioxide leaves the bloodstream because there's more carbon dioxide in the blood than in the alveoli.
The structure of the lungs is perfectly designed for gas exchange. The alveoli have a huge surface area, which allows for maximum diffusion of gases.