The space between the lung and chest wall is called the pleural space. Pneumothorax occurs when air leaks out of the lung and is trapped in this space. The air presses on the lung and can cause part or all of the lung to collapse.