The alveoli are the primary sites for gas exchange and are lined by a thin layer of simple squamous epithelium known as type I alveolar cells. Type II alveolar cells are also present and secrete surfactant, a substance that reduces surface tension and prevents alveolar collapse.