A pulmonary alveolus (plural: alveoli, from Latin alveolus, "little cavity") is a hollow cup-shaped cavity found in the lung parenchyma, and is the basic unit of ventilation. Lung alveoli are the ends of the respiratory tree, branching from either alveolar sacs or alveolar ducts, which like alveoli are both sites of gas exchange with the blood as well. Alveoli are particular to mammalian lungs. Different structures are involved in gas exchange in other vertebrates. The alveolar membrane is the gas exchange surface. Carbon dioxide rich blood is pumped from the rest of the body into the capillaries that surround the alveoli where, through diffusion, carbon dioxide is released and oxygen is absorbed.
A typical pair of human lungs contain about 300 million alveoli, producing 70m2 of surface area. Each alveolus is wrapped in a fine mesh of capillaries covering about 70% of its area. The diameter of an alveolus is between 200 and 500 µm.
The alveoli consist of an epithelial layer and an extracellular matrix surrounded by capillaries. In the alveolar walls there are interconnecting air passages between the alveoli known as the pores of Kohn. The alveoli contain some collagen fibers and elastic fibers. The elastic fibres allow the alveoli to stretch when they fill with air during inhalation. They then spring back during exhalation in order to expel the carbon dioxide-rich air.
There are three major types of alveolar cell. Two types are pneumocytes known as type I and type II cells are found in the alveolar wall, and a large phagocytic cell known as an alveolar macrophage moves about in the lumens of the alveoli and in the connective tissue between them. Type I cells are squamous, thin and flat and form the structure of the alveoli. Type II cells release pulmonary surfactant to lower surface tension. Type II cells can also differentiate to replace damaged type I cells.
Type I cells are thin and flat epithelial lining cells, that form the structure of the alveoli. They are squamous (giving more surface area to each cell) and their long cytoplasmic extensions line more than 95% of the alveolar surface.
Type I cells are involved in the process of gas exchange between the alveoli and blood. These cells are extremely thin sometimes only 25 nm – the electron microscope was needed to prove that all alveoli are lined with epithelial. This thin lining enables a fast diffusion of gas exchange between the air in the alveoli and the blood in the surrounding capillaries.
The nucleus of a type I cell occupies a large area of free cytoplasm and its organelles are clustered around it reducing the thickness of the cell. This also keeps the thickness of the blood-air barrier reduced to a minimum.
The cytoplasm in the thin portion contains pinocytotic vesicles which may play a role in the removal of small particulate contaminants from the outer surface. In addition to desmosomes, all type I alveolar cells have occluding junctions that prevent the leakage of tissue fluid into the alveolar air space.
The relatively low solubility (and hence rate of diffusion) of oxygen, necessitates the large internal surface area (about 80 square m [96 square yards]) and very thin walls of the alveoli. Weaving between the capillaries and helping to support them is an extracellular matrix, a meshlike fabric of elastic and collagenous fibres. The collagen fibres, being more rigid, give the wall firmness, while the elastic fibres permit expansion and contraction of the walls during breathing.
Type II cells are the most numerous cells in the alveoli, yet do not cover as much surface area as the squamous type I cells. Type II cells in the alveolar wall contain secretory granular organelles known as lamellar bodies that fuse with the cell membranes and secrete pulmonary surfactant. This surfactant is a film of fatty substances, a group of phospholipids that reduce alveolar surface tension. The phospholipids are stored in the lamellar bodies. Without this coating, the alveoli would collapse. The surfactant is continuously released by exocytosis. Reinflation of the alveoli following exhalation is made easier by the surfactant, that reduces surface tension in the thin fluid coating of the alveoli. The fluid coating is produced by the body in order to facilitate the transfer of gases between blood and alveolar air, and the type II cells are typically found at the blood-air barrier. 
Type II cells start to develop at about 26 weeks of gestation, secreting small amounts of surfactant. However, adequate amounts of surfactant are not secreted until about 35 weeks of gestation – this is the main reason for increased rates of infant respiratory distress syndrome, which drastically reduces at ages above 35 weeks gestation.
Type II cells are also capable of cellular division, giving rise to more type I and II alveolar cells when the lung tissue is damaged.
The alveolar macrophages reside on the internal lumenal surfaces of the alveoli, the alveolar ducts, and the bronchioles. They are mobile scavengers that serve to engulf foreign particles in the lungs, such as dust, bacteria, carbon particles, and blood cells from injuries. They are also called dust cells.
Insufficient surfactant in the alveoli can contribute to atelectasis (collapse of part or all of the lung). Without pulmonary surfactant, atelectasis is a certainty; however, there are other causes of lung collapse such as trauma, pneumothorax, COPD, and pleuritis.