Compliance is the ability of lungs and thorax to expand. 
Lung compliance is defined as the volume change per unit of pressure change across the lung. Measurements of lung volume obtained during the controlled inflation/deflation of a normal lung show that the volumes obtained during deflation exceed those during inflation, at a given pressure. This difference in inflation and deflation volumes at a given pressure is called hysteresis and is due to the air-water surface tension that occurs at the beginning of inflation. However, surfactant decreases the alveolar surface tension, as seen in cases of premature infants with infant respiratory distress syndrome.  The normal surface tension for water is 70 dyn/cm (70 mN/m) and in the lungs, it is 25 dyn/cm (25 mN/m); however, at the end of the expiration, compressed surfactant phospholipid molecules decrease the surface tension to very low, near-zero levels. Pulmonary surfactant thus greatly reduces surface tension, increasing compliance allowing the lung to inflate much more easily, thereby reducing the work of breathing.  It reduces the pressure difference needed to allow the lung to inflate. The lung's compliance, and ventilation decrease when lung tissue becomes diseased and fibrotic.