CPAP works by providing a positive pressure of air through the mask and into the airway, which helps to keep the airway open. This helps to prevent breathing difficulties, increase the level of oxygen in the lungs and removes the unwanted gas (carbon dioxide) out of the lungs.