Pneumonia often starts as a respiratory infection caused by bacteria, viruses, or fungi. It can then progress to inflammation and infection of the lungs.