In most mammals, it involves oxygen from air being trasported across the "type I pneumocyte" (a broad, thin, leaf-like cell) which makes up the lining of the alveoli (air sacs) of the lungs. The other cell in close association with the pneumocyte is the 'endothelial cell'. This cell makes up the lining of the small blood vessel next to alveoli. Gas is exchanged across these cells by diffusion.
Carbon dioxide, the main waste product of metabolism, diffuses rapidly across these two cells so we can exhale it.
Oxygen is not as soluble and the hemoglobin of blood facilites this diffusion so we can absorb it into our blood.