Surfactant is a lipoprotein complex produced by Type II pneumocytes. It reduces the surface tension within the alveoli, preventing their collapse during exhalation and ensuring efficient gas exchange. Surfactant also has immune functions, aiding in the defense against respiratory pathogens.