How can I treat pneumothorax?

Depends on the size. Some pneumothoraces will resolve on their own. Larger pneumothoraces require a tube to be placed in the chest to pre-expand the lung. If someone has multiple pneumothoraces they may need a surgical procedure called a pleurodesis to prevent it from happening again.
See below. This is treated by a doctor through needle decompression, oxygen, or a chest tube. It depends on the extent, severity, and comorbidities.