The walls of the alveoli are made up of an extreemly thin, single layer of squamous epithelial cells. The external surface of the alveoli are covered with pulmonary capillaries.
The gaseous exchange occurs when oxygen passes from the alveoli into the capillary blood. Carbon dioxide leaving the blood then enters into the gas filled alveolus. Essentials of Human Anatomy and Physiology (Elaine N. Marieb)
There are a number of necessary conditions that allow effective gaseous exchange. Here is a list of 5 important factors.
1. Temperature: the warmer the conditions are the faster the diffusion rate between the blood and alveoli.
2. A constant ventilation must be in place to maintain a concentration gradient to stop equilibrium.
3. Thin permeable cell walls allow rapid diffusion. Faster gas exchange.
4. A larger surface area to volume ratio, for example if there are lots of alveoli stacked together in the lungs, more gaseous exchange is able to take place.
5. A concentration difference of the gases from one side to the other.