You use your lungs to inhale air, which contains oxygen. This oxygen passes into the bloodstream and then onto your cells.
The cells release carbon dioxide as a waste product of respiration, which is passed into the blood. This blood goes to the lungs, where the carbon dioxide is expelled when you breathe out.