Alveoli are microscopic air sacs in the lungs. During inspiration (breathing in), oxygen diffuses from the air in the alveoli into the blood. At the same time, carbon dioxide carried in the blood diffuses out into the alveoli to be subsequently exhaled during expiration (breathing out). Alveoli have a number of structural features which make them well-adapted for this process, which is known as gas exchange (NB this is best demonstrated with a diagram, which I would aim to draw during my explanation). Firstly, they have a folded structure, thereby providing a large surface area for the diffusion of oxygen and carbon dioxide. Furthermore, they are just one cell thick, which reduces the diffusion distance for both oxygen and carbon dioxide. Lastly, they are surrounded by an extensive capillary network through which blood is perpetually flowing. This means that oxygen is constantly transported away from the alveoli and carbon dioxide is constantly transported to the alveoli. This maintains a steep concentration gradient for both gases, thereby increasing the rate of diffusion.