During PEP therapy, patients breathe out against a resistance provided by a device, such as a mask, mouthpiece, or valve. The resistance creates a back pressure in the airways, which helps to prevent airway collapse and encourages the mobilization of secretions. This process enhances ventilation and improves gas exchange in the lungs.