In the lungs, oxygen and carbon dioxide (a waste product of body processes) are exchanged in the tiny air sacs (alveoli) at the end of the bronchial tubes. The alveoli are surrounded by capillaries. When a person inhales, oxygen moves from the alveoli to the surrounding capillaries and into the bloodstream. At the same time, carbon dioxide moves from the bloodstream to the capillaries and into the alveoli. The carbon dioxide is removed from the lungs when a person exhales.
The exchange takes place in the millions of alveoli in the lungs and the capillaries that envelop them. As shown below, inhaled oxygen moves from the alveoli to the blood in the capillaries, and carbon dioxide moves from the blood in the capillaries to the air in the alveoli.