If an object enters the thorax, it could puncture the pleural cavity. If there are holes in the pleura cavity, air comes between the parietal and visceral pleural. The two membranes are then wholly or partially separated causing the lung to collapse. This is called a pneumothorax and will cause difficulties with breathing.
This can be rectified by inserting a drain with a vacuum that sucks out the fluid and air from the pleuracavity.