The TeachPE website states that diffusion takes place in the lungs when the molecules move away from a higher concentration to a location of lower concentration. Diffusion occurs during what is known as gaseous exchange.
This gaseous exchange happens when the blood found in the capillaries that surround the alveoli in the lungs has lower oxygen concentrations compared to the oxygen inhaled. A similar process occurs with carbon dioxide (CO2). However, CO2 diffuses in the opposite way to oxygen, as the blood located in the capillaries contains higher concentrations of carbon dioxide compared to the inspired air. The inspired air is a type of waste product associated with energy production.