Oxygen moves from the bloodstream to the air via the lungs through the process of gas exchange. When you inhale, oxygen from the air passes into the blood vessels through the thin lining of the air sacs, a process called diffusion. At the same time, carbon dioxide, a waste gas, moves from the blood to the lungs.