Pneumonia is typically caused by bacteria, viruses, or fungi that enter the lungs. The most common way to get pneumonia is by inhaling small droplets from a cough or sneeze of an infected person. People can also get pneumonia through contact with surfaces or objects that have been contaminated with the germ, or by inhaling chemical fumes or dust. Certain medical conditions and lifestyle factors can make a person more vulnerable to pneumonia. These include smoking, a weakened immune system, chronic health conditions such as asthma, heart disease, and diabetes, and living in a long-term care facility.