The respiratory system is set up in order to promote the exchange of gases between the air and our blood. In fact, this very exchange of gases between the blood and our lungs is called respiration. Your Preliminary PDHPE syllabus asks you to understand both the external exchange of gases and the internal exchange of gases, however, only one of these occurs in the respiratory system, the other occurs in the circulatory system as it interacts with your working cells, and in our case, muscles.
The external exchange of gases occur between the alveoli and the capillaries that encase them. De-oxygenated (no oxygen) blood travels in the capillaries to the alveoli, where carbon-dioxide diffuses out of the blood and into the alveoli. At the same time, oxygen that has been brought into the alveoli through inspiration diffuses across the alveoli membrane and into the capillaries. This is external respiration. This results in oxygenated blood being taken away from the lungs, back to the heart where it gets pumped around the body for use, while the carbon-dioxide is expired into the atmosphere.
The internal exchange of gases occur between the capillaries that encase cells, for us particularly muscle cells, and the cell itself. Here the oxygenated blood is brought to the muscle, where oxygen is taken out of the blood and transferred to the muscle tissue, while at the same time carbon-dioxide is taken out of the muscle cell and brought into the blood. Oxygen is transported through the blood attached to haemoglobin, and travels in the muscle attached to myoglobin. The exchange of gases across the membranes of the capillary and the muscle is referred to as diffusion and is known as internal respiration.
The carbon-dioxide is then taken to the lungs via the heart in order to remove the carbon-dioxide and receive oxygen again (external respiration).
Further information on the exchange of gases can be found here.