Gas exchange in the alveoli occurs through a process known as diffusion. The thinness of the alveolar walls, along with the extensive capillary network, creates a large surface area for gases to diffuse across. Oxygen from inhaled air diffuses through the alveolar membrane into the blood, while carbon dioxide from the blood diffuses into the alveoli to be exhaled.