Pneumonia is a potentially severe respiratory infection that affects one or both lungs. It causes the air sacs, or alveoli, of the lungs to fill up with fluid or pus. Pneumonia can be caused by various microorganisms, including bacteria, viruses, and fungi, as well as non-infectious factors, such as inhaling irritants or aspirating food or liquids into the lungs.