CPAP works by delivering a constant stream of air through a mask worn over the nose or mouth. This positive pressure helps to keep the airway open, preventing the collapse that leads to apneas and hypopneas. By maintaining airway patency, CPAP ensures continuous airflow, improving sleep quality and oxygenation.