The primary function of the respiratory system is to exchange carbon dioxide and oxygen. Inhaled oxygen enters the lungs and reaches the alveoli. The layers of cells lining the alveoli and the surrounding capillaries are each only one cell thick and are in very close contact with each other. Oxygen passes quickly through this air blood barrier into the blood in the capillaries. Similarly,carbon dioxide passes from the blood into the alveoli and is then exhaled.
Gaseous exchange occurs in alveoli of lungs by diffusion of gases through wall of alveoli