Pneumonia is contracted when germs, most commonly bacteria or viruses, enter your lungs and overwhelm your body’s defenses. This can happen through breathing in infectious droplets from another person, aspirating food or liquid into your airways, or inhaling fungal spores from the environment. In the United States, community-acquired pneumonia accounts for over 4.5 million outpatient and emergency room visits each year, and roughly 1.5 million adults are hospitalized for it annually.
Breathing in Germs From Other People
The most common way to contract pneumonia is by inhaling bacteria or viruses that someone else has released into the air. When an infected person coughs, sneezes, or talks, they shed respiratory secretions containing the pathogen. You breathe in those droplets, and if your immune system can’t neutralize the germs quickly enough, infection takes hold in your lungs.
Many people carry pneumonia-causing bacteria in their nose or throat without ever getting sick. The CDC notes that this “carriage” is especially common in children and only rarely progresses to illness. Whether an exposure leads to pneumonia depends heavily on the type of germ, the dose you inhale, and how well your immune system is functioning at the time.
Some germs spread more efficiently through direct person-to-person contact than through airborne particles. Rhinoviruses, for example, spread most readily through touching contaminated hands or surfaces and then touching your face, though large-particle aerosols play a role too.
Viruses That Lead to Pneumonia
Not every respiratory virus causes pneumonia, but several can progress from an upper respiratory infection into a lung infection. The main culprits include influenza, RSV (respiratory syncytial virus), SARS-CoV-2, adenoviruses, parainfluenza viruses, and human metapneumovirus. In many cases, pneumonia develops as a complication after the virus has already been causing cold or flu symptoms for several days.
Viral pneumonia tends to start with familiar symptoms like fever, cough, and body aches, then worsens as the infection moves deeper into the lungs. Young children and older adults are particularly vulnerable to this progression, especially with RSV and influenza.
Aspiration: When Food or Liquid Enters Your Lungs
Aspiration pneumonia happens when food, drink, vomit, or saliva goes down your windpipe and into your lungs instead of your esophagus. Your lungs aren’t equipped to clear these substances the way your digestive tract is, so bacteria from your mouth or stomach gain a foothold and multiply.
This type of pneumonia is most likely when something disrupts your normal gag reflex or swallowing ability. Neurological conditions like stroke, Parkinson’s disease, dementia, or traumatic brain injury can all impair the muscles and reflexes that keep food out of your airways. Chronic acid reflux (GERD) is another risk factor, since stomach contents can travel upward and slip into the lungs, particularly during sleep.
Alcohol and drug use also increase aspiration risk. If you’re sedated, unconscious, or heavily intoxicated, the protective reflexes that normally trigger coughing when something enters the wrong pipe are suppressed. This is one reason pneumonia is a common complication of overdoses.
Fungal Pneumonia From Environmental Exposure
Unlike bacterial or viral pneumonia, fungal pneumonia isn’t caught from other people. You contract it by inhaling fungal spores from the environment, particularly from soil rich in organic material. One of the most well-known types, histoplasmosis, is caused by a fungus found in bird and bat droppings. It thrives in chicken coops, old barns, caves, and parks.
In the United States, histoplasmosis is most common in the Mississippi and Ohio River valleys. The spores become airborne when contaminated soil is disturbed during demolition, construction, or cleanup projects. Most healthy people who inhale small amounts of the fungus never develop symptoms, but inhaling a large dose or having a weakened immune system can lead to a serious lung infection.
Hospital-Acquired and Ventilator-Associated Pneumonia
Pneumonia contracted during a hospital stay is a distinct category with its own set of causes. Patients in intensive care units face the highest risk, especially those on ventilators. A breathing tube bypasses the body’s natural airway defenses, impairs the ability to cough, and disrupts the tiny hair-like structures that normally sweep mucus and bacteria out of the airways.
Bacteria-laden secretions pool above the inflated cuff of the breathing tube and leak into the lungs in tiny amounts, a process called microaspiration. Over time, bacteria also form a protective layer called a biofilm on the inside and outside of the tube itself, shielding them from both the immune system and antibiotics. Patients who are immobile or sedated face additional risk because their bodies can’t clear secretions as effectively.
How Long Before Symptoms Appear
The time between exposure and the onset of symptoms varies depending on the pathogen. For one common type of bacterial pneumonia caused by Mycoplasma (sometimes called “walking pneumonia”), the incubation period is one to four weeks. Viral pneumonia tied to influenza or RSV typically develops faster, often within a few days of the initial respiratory infection. Aspiration pneumonia can develop within hours to days of the aspiration event, depending on the volume of material inhaled and the bacteria involved.
Who Is Most Vulnerable
Age sits at the top of the risk list. Children under two are more susceptible because their immune systems are still maturing, and premature babies face even higher risk. On the other end of the spectrum, adults 65 and older are hospitalized for pneumonia at roughly three times the overall adult rate, about 2,000 per 100,000 people per year compared to 650 per 100,000 across all adults.
Smoking is a major modifiable risk factor because it damages the mucus-clearing mechanisms in your airways, the very system your lungs rely on to trap and expel germs before they cause infection. Chronic lung diseases like COPD, asthma, cystic fibrosis, and bronchiectasis compound this problem by further compromising lung function.
Conditions that weaken the immune system also raise your risk substantially. These include HIV/AIDS, organ or bone marrow transplants, chemotherapy, long-term steroid use, and pregnancy. Serious chronic illnesses like diabetes, heart failure, liver disease, kidney disease, sickle cell disease, and malnutrition all make it harder for the body to fight off lung infections.
Your environment matters too. Living or spending extended time in crowded settings like nursing homes, military barracks, homeless shelters, or prisons increases exposure to respiratory pathogens. Regular exposure to air pollution or toxic fumes at work can irritate and damage lung tissue, lowering your resistance to infection.
Reducing Your Risk
Vaccination is the most effective tool for preventing bacterial pneumonia. The CDC’s Advisory Committee on Immunization Practices recommends pneumococcal conjugate vaccines for all children and for adults aged 50 and older, with updated guidelines expanding the recommendation in 2024 to include a newer 21-valent vaccine that covers more bacterial strains. Adults aged 19 to 49 with certain risk factors, like chronic lung disease or a weakened immune system, are also recommended to receive the vaccine.
Annual flu vaccination and staying current on COVID-19 vaccines reduce your chances of developing viral pneumonia from those specific infections. Beyond vaccination, the same basics that protect against any respiratory infection apply: washing your hands frequently, avoiding close contact with people who are visibly sick, not smoking, and managing chronic conditions that affect your lungs or immune system. For people at risk of aspiration, working with a speech therapist to improve swallowing technique and managing acid reflux can meaningfully lower the chance of aspiration pneumonia.