Dear student
Air is a mixture of gases. When we inhale through our nose, we take in the whole mixture to our lungs.
Heart constantly pumps “deoxygenated ” blood towards the lungs, this deoxygenated is full of carbon dioxide and is literally gasping for oxygen and when it meets the air in the lungs, the deoxygenated blood will only absorb the oxygen from the air and also get rid of carbon dioxide at the same time.
Regards