Lung infections make people cough. But most cases of pneumonia are acute infections requiring rapid diagnosis and treatment. Lung infections caused by mycoplasma, chlamydia, and tuberculosis, however, can be more indolent and can cause a persistent cough.