Surfactant lipids and proteins form a surface active film at the air-liquid interface of internal gas exchange organs, including swim bladders and lungs. The system is uniquely positioned to meet both the physical challenges associated with a dynamically changing internal air-liquid interface, and the environmental challenges associated with the foreign pathogens and particles to which the internal surface is exposed. Lungs range from simple, transparent, bag-like units to complex, multilobed, compartmentalized structures. Despite this anatomical variability, the surfactant system is remarkably conserved. Here, we discuss the evolutionary origin of the surfactant system, which likely predates lungs. We describe the evolution of surfactant structure and function in invertebrates and vertebrates. We focus on changes in lipid and protein composition and surfactant function from its antiadhesive and innate immune to its alveolar stability and structural integrity functions. We discuss the biochemical, hormonal, autonomic, and mechanical factors that regulate normal surfactant secretion in mature animals. We present an analysis of the ontogeny of surfactant development among the vertebrates and the contribution of different regulatory mechanisms that control this development. We also discuss environmental (oxygen), hormonal and biochemical (glucocorticoids and glucose) and pollutant (maternal smoking, alcohol, and common "recreational" drugs) effects that impact surfactant development. On the adult surfactant system, we focus on environmental variables including temperature, pressure, and hypoxia that have shaped its evolution and we discuss the resultant biochemical, biophysical, and cellular adaptations. Finally, we discuss the effect of major modern gaseous and particulate pollutants on the lung and surfactant system.