Pneumonia is not a bacteria. It’s an infection of the lungs that can be caused by bacteria, viruses, fungi, or even parasites. The confusion is understandable because bacterial pneumonia is the most well-known form, but the word “pneumonia” refers to the condition itself: inflammation of the tiny air sacs in your lungs, which fill with fluid or pus and make breathing difficult.
What Actually Causes Pneumonia
When germs get into your lungs, your immune system fights back by triggering inflammation in the air sacs (called alveoli). That inflammation causes fluid buildup, which leads to the cough, fever, and breathing trouble associated with pneumonia. The germ that started the infection can be bacterial, viral, or fungal, and each type behaves a bit differently.
In one study of 150 patients hospitalized with community-acquired pneumonia, 31.3% had a bacterial infection alone, 45.3% had a viral infection alone, and 23.3% had both a virus and bacteria at the same time. So while bacteria get most of the attention, viruses actually account for a large share of cases.
Bacterial Pneumonia
Bacteria are the most common cause of pneumonia in adults. The leading culprit in the United States is a species called pneumococcus, which is the target of the pneumococcal vaccines given to children and older adults. Other bacteria that frequently cause pneumonia include Mycoplasma (responsible for “walking pneumonia”), Chlamydia pneumoniae, and Haemophilus influenzae.
Bacterial pneumonia tends to hit hard. Fevers can spike as high as 105°F, and the cough often produces green, yellow, or bloody mucus. A doctor listening to your lungs with a stethoscope will typically hear crackling sounds concentrated in one specific area, which is a hallmark of bacterial infection rather than a viral one. Symptoms usually come on faster and feel more severe than what you’d experience with a viral case.
A more unusual form, called atypical or “walking” pneumonia, is caused by Mycoplasma bacteria. People with this type often feel surprisingly functional for someone with a lung infection. They have a cough, fatigue, fever, and some shortness of breath, but they’re usually still up and moving around, which is how it got its nickname.
Viral Pneumonia
Viruses are the other major cause, especially the flu, rhinovirus (the common cold virus), RSV, and SARS-CoV-2 (the virus behind COVID-19). RSV is the most common cause of viral pneumonia in young children, while influenza and COVID-19 are bigger concerns for adults.
Viral pneumonia generally starts more gradually than the bacterial form. Symptoms can feel like a bad cold or flu that keeps getting worse instead of better, with a dry cough rather than one producing thick, colored mucus. The danger with viral pneumonia is that it can weaken your lungs enough for bacteria to move in on top of the virus, creating a co-infection that’s harder to treat.
Fungal Pneumonia
Fungal pneumonia is far less common and mostly affects people with weakened immune systems. Certain fungi found in soil in the southwestern United States and the Ohio and Mississippi River valleys can cause pneumonia in otherwise healthy people who inhale the spores, but this remains relatively rare compared to bacterial and viral cases.
How Doctors Tell the Difference
Figuring out whether your pneumonia is bacterial or viral matters because antibiotics only work against bacteria. Doctors use a combination of clues: your symptoms, a chest X-ray, and sometimes blood tests. One useful blood marker is a protein that rises sharply during bacterial infections but stays relatively low during viral ones. Chest X-rays can also offer hints. Bacterial pneumonia tends to show up as a dense, localized patch in one area of the lung, while viral pneumonia more often creates a hazier, more spread-out pattern across both lungs.
In practice, doctors sometimes start antibiotics before test results come back if bacterial pneumonia looks likely, because waiting too long increases the risk of complications.
Complications of Bacterial Pneumonia
Bacterial pneumonia carries a higher risk of serious complications than most viral cases. One of the more common is fluid collecting in the space between the lung and the chest wall. This starts as sterile fluid leaking from inflamed lung tissue, but if bacteria invade that space, it can become infected pus, a condition called empyema. About 70% of empyema cases are caused by bacterial pneumonia, and hospitalization rates for this complication have roughly tripled in the United States over a 20-year period.
Bacteria from the lungs can also enter the bloodstream, leading to sepsis, a life-threatening whole-body inflammatory response. Lung abscesses, where pockets of pus form within the lung tissue itself, are another possible complication. These risks are why bacterial pneumonia, particularly in older adults or people with chronic health conditions, requires prompt treatment.
Vaccines That Prevent Bacterial Pneumonia
The most effective prevention tool for bacterial pneumonia is the pneumococcal vaccine, which targets the most common bacterial cause. The CDC recommends a four-dose series for all children under 5, starting at 2 months of age. For adults 50 and older, a single dose of the newer vaccines (PCV20 or PCV21) completes the series with no follow-up shot needed.
The annual flu shot and COVID-19 vaccines also help prevent pneumonia indirectly, since viral infections can damage the lungs and set the stage for a secondary bacterial infection. Preventing the initial virus reduces your overall pneumonia risk from multiple angles.