Pneumonia is an infection that can affect one or both of your lungs. Bacteria, a virus, or even fungi can trigger pneumonia. In the United States, bacterial pneumonia is commonly the result of infection with Streptococcus pneumoniae bacteria. These viruses that cause colds and flu also can cause pneumonia, which usually results in a more mild form of the condition. Fungi — inhaled from soil or bird droppings — can also be to blame, typically in people with weakened immune systems.