Pneumonia is an inflammation (swelling) of the tissue in one or both lungs. It happens as a result of infection caused by fungi, viruses, and bacteria. Before antibiotics