Bacteria, viruses, or fungi that live in your nose, mouth, sinuses, or the surrounding environment can enter your lungs and create infections, including pneumonia. You can get the bacteria or viruses from people who are infected with them, whether they show symptoms or not.
The leading cause of severe pneumonia in children in developing countries is Streptococcus pneumoniae bacteria, or pneumococcus. Another leading cause is Haemophilus influenzae type b, or Hib.
Other causes of pneumonia include influenza, staph infections, human respiratory syncytial virus, rhinovirus, herpes simplex virus, and severe acute respiratory syndrome (SARS).
Less common types of pneumonia can be acquired through the inhalation of food, liquids, gases, dust, and certain fungi.
Pneumocystis carinii (now renamed Pneumocystis jiroveci) pneumonia (PCP) is a fungal infection that can affect people with weakened immune systems, including those with HIV/AIDS.