I just got this question not to long ago but to answer your question the primary function of the respiratory system is to exchange oxygen and carbon dioxide. Inhaled oxygen enters the lungs and reaches the alveoli. 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.