CPAP (continuous positive airway pressure) is a machine that uses mild air pressure to keep breathing airways open while you sleep. Your healthcare provider may prescribe CPAP to treat sleep-related breathing disorders including sleep apnea. CPAP also may treat preterm infants who have underdeveloped lungs.