How pneumonia starts in your lungs

Pneumonia develops when germs—usually bacteria, viruses, or fungi—get into your lungs and cause an infection. Your lungs fill with fluid or pus, making it harder for oxygen to reach your bloodstream. This is why pneumonia can make you feel short of breath and exhausted, even when you're resting.

The infection doesn't happen all at once. It usually starts when you breathe in germs that settle in your air sacs (the tiny pouches in your lungs where oxygen normally enters your blood). Your immune system tries to fight back, which causes inflammation and fluid buildup. That's when you start feeling sick.

Key Takeaways

  • Pneumonia develops when bacteria, viruses, or fungi enter your lungs and multiply, causing your air sacs to fill with fluid or pus.
  • You catch pneumonia by breathing in germs from an infected person's cough or sneeze, or from germs already in your environment.
  • Certain conditions—like a weakened immune system, chronic lung disease, or recent flu—make pneumonia more likely to develop.
  • Symptoms usually appear within a few days of infection and include cough, fever, chest pain, and shortness of breath.
  • A chest X-ray is the standard way doctors confirm pneumonia and see where the infection is in your lungs.

The three main types of pneumonia and how you catch them

Bacterial pneumonia is the most common type in adults. You typically catch it by breathing in droplets from someone who is coughing or sneezing. Streptococcus pneumoniae is the bacterium responsible for most cases. Bacterial pneumonia can develop on its own or after you've had a cold or flu.

Viral pneumonia usually comes from respiratory viruses like influenza (the flu), respiratory syncytial virus (RSV), or coronaviruses. You catch it the same way—through respiratory droplets—and it often causes milder symptoms than bacterial pneumonia, though it can still be serious.

Fungal pneumonia is less common and usually only develops in people with weakened immune systems. You might breathe in fungal spores from soil or bird droppings. This type is rare in otherwise healthy people.

Risk factors that make pneumonia more likely

Some people are more likely to develop pneumonia than others. If you're over 65, your immune system is naturally weaker at fighting off infections. The same is true if you have a chronic condition like asthma, COPD (chronic obstructive pulmonary disease), heart disease, or diabetes.

Recent illness also increases your risk. If you've just had the flu or a bad cold, your lungs are already inflamed and your immune system is tired, making it easier for pneumonia bacteria to take hold. Smoking damages the lining of your airways, so smokers develop pneumonia more often than non-smokers.

People with weakened immune systems—including those with HIV, those taking immunosuppressant medications, or those undergoing chemotherapy—face higher risk. Hospital patients on ventilators can develop a type called ventilator-associated pneumonia. Even being bedridden for a long time increases risk because fluid can pool in your lungs.

What happens inside your lungs as pneumonia develops

When germs first enter your lungs, your immune system recognizes them as invaders and sends white blood cells to attack. This immune response causes inflammation—swelling and irritation of the lung tissue. Blood vessels in your lungs leak fluid into the air sacs, filling them with liquid instead of air.

As more fluid accumulates, your lungs become less able to transfer oxygen into your blood. Your body responds by making you breathe faster and harder, which is why shortness of breath is a hallmark symptom. The inflammation also irritates your airways, triggering the persistent cough that characterizes pneumonia.

If the infection spreads or your immune system can't control it, the condition can worsen. In severe cases, the infection can enter your bloodstream (sepsis) or fluid can build up around your lungs (pleural effusion), making breathing even more difficult.

Symptoms that signal pneumonia is developing

Pneumonia symptoms usually appear within a few days of infection. You'll typically notice a cough that may start dry and then produce mucus (sputum), which can be clear, yellow, or greenish. Fever is common, though not everyone runs a high temperature.

Chest pain or discomfort when you breathe or cough is another key sign—this happens because the inflamed lung tissue irritates the lining around your lungs. You may feel short of breath even when resting, and you might notice you're unusually tired or weak. Some people also experience chills, body aches, or a sore throat.

Symptoms can develop quickly or gradually depending on the type of pneumonia and your overall health. Bacterial pneumonia often comes on suddenly with high fever and severe symptoms. Viral pneumonia may develop more slowly with milder symptoms that gradually worsen.

How doctors confirm pneumonia and what happens next

Your doctor will start by listening to your lungs with a stethoscope. Pneumonia often produces distinctive crackling or bubbling sounds. They'll ask about your symptoms and medical history, including whether you've been around someone who was sick.

A chest X-ray is the standard test to confirm pneumonia. It shows areas of your lungs filled with fluid or pus, which appear as white patches on the image. Your doctor may also order blood tests to identify which germ is causing the infection, especially if you're hospitalized or very ill.

Once pneumonia is confirmed, treatment depends on the type. Bacterial pneumonia is treated with antibiotics, which kill the bacteria causing the infection. Viral pneumonia usually improves on its own as your immune system fights the virus, though your doctor may prescribe antivirals in some cases. You'll also be advised to rest, drink fluids, and manage your fever with over-the-counter pain relievers.

When pneumonia becomes serious

Most people recover from pneumonia with treatment, but complications can develop. Severe pneumonia can lead to respiratory failure, where your lungs can't deliver enough oxygen to your blood. This may require hospitalization and oxygen support or, in the worst cases, a ventilator to help you breathe.

Sepsis—when the infection enters your bloodstream—is a life-threatening complication that requires immediate hospital care. Pleural effusion (fluid around the lungs) or empyema (pus around the lungs) can also develop and may need to be drained. Older adults, people with chronic illnesses, and those with weakened immune systems face higher risk of these serious complications.

This is why seeking medical attention early matters. If you develop symptoms of pneumonia—especially if you have a high fever, severe shortness of breath, or chest pain—contact your doctor or go to an urgent care clinic. Early treatment can prevent complications and help you recover faster.

Frequently Asked Questions

Can you get pneumonia from being cold or wet?

No. Pneumonia is caused by germs, not by cold weather or getting wet. However, cold weather can make respiratory infections more common because people spend more time indoors in close contact with others. Being cold or wet might make you more susceptible to catching a virus that could lead to pneumonia, but the cold itself doesn't cause it.

How long does it take to develop pneumonia after exposure?

Symptoms usually appear within 3 to 7 days of breathing in the germ, though this varies. Some people show signs within 24 hours, while others take up to 2 weeks. The timeline depends on which germ infected you and how strong your immune system is.

Can pneumonia develop without a cough?

Yes, though a cough is the most common symptom. Some people, especially older adults, develop pneumonia with mainly fever, confusion, or shortness of breath but little or no cough. This is why it's important to see a doctor if you have fever and breathing problems, even without a prominent cough.

Is pneumonia contagious?

The germs that cause pneumonia are contagious, but pneumonia itself isn't. You can catch the cold or flu virus from someone with viral pneumonia, and that virus might develop into pneumonia in you. Similarly, you can catch the bacteria from someone with bacterial pneumonia, though not everyone who catches it will develop the disease.

Can you develop pneumonia twice?

Yes. Having pneumonia once doesn't make you immune to future infections. You can catch pneumonia again from different germs or even the same type if your immune system hasn't built lasting protection. People with chronic lung disease or weakened immune systems are at higher risk of recurrent pneumonia.