A CPAP (continuous positive airway pressure) machine's primary use is to treat Obstructive Sleep Apnea (OSA) by delivering a steady stream of pressurized air through a mask to keep the user's airway open during sleep, thereby preventing pauses in breathing.