Gas exchange is the process by which oxygen is transported to cells and carbon dioxide is removed from the body. This occurs primarily in the alveoli of the lungs, where oxygen from inhaled air diffuses into the blood and carbon dioxide from the blood diffuses into the alveoli to be exhaled.