If air leaks into the space between a lung and the ribs, it can cause the lung to collapse. A collapsed lung can cause chest pain that starts suddenly and lasts for several hours.