As the weather cools down, pneumonia cases go up. This is because germs are more easily spread when people spend more time indoors close to others.

Pneumonia is an infection that can affect one or both of your lungs. There are different types of pneumonia that can be caused by different types of germs. You may have heard of "walking pneumonia" which is one common type of the illness.

People ages 60 and older and children ages 2 and younger are at increased risk of pneumonia. People who are in the hospital or in a long-term care facility are also at higher risk.

Our experts explain some top questions about pneumonia and walking pneumonia.

How do you get pneumonia?

You get pneumonia through germs that enter your lungs. These germs are typically in the air you breathe. There are three types of germs that can cause pneumonia:

  • Bacteria: This leads to bacterial pneumonia. It often develops after you have a cold or flu.
  • Fungi: This type of pneumonia usually develops in people with weak immune systems or long-term health conditions. Fungi is found in certain soil and bird droppings.
  • Viruses: These germs can impact your upper airways and lungs. Flu and COVID-19 can cause viral pneumonia in adults. Respiratory syncytial virus (RSV) can lead to viral pneumonia in adults and children.

Learn about the types of pneumonia

Find out more about the causes and risk factors of pneumonia

What are the common symptoms of pneumonia?

Pneumonia symptoms can vary depending on your age and other health conditions. The common symptoms of pneumonia include:

  • Chest pain when you cough or breathe
  • Confusion, especially for people ages 65 and older
  • Cough, which can have green, yellow or bloody mucus
  • Chills
  • Fatigue
  • Fever
  • Loss of appetite
  • Nausea and vomiting
  • Night sweats
  • Pain near your left ribcage (spleen)
  • Shortness of breath

What are the early warning signs of pneumonia?

Early symptoms of pneumonia can seem like the flu. The first signs of pneumonia can be a fever, cough, headache and weakness. After that, symptoms may get worse over the next couple of days. Coughing happens more often and may come with shortness of breath.

Explore seven facts about the flu and why you should get a flu shot

Is pneumonia contagious?

Yes, pneumonia can be contagious and spread from person to person. Bacterial and viral pneumonia are contagious, but pneumonia caused by fungi is not.

It's mostly spread when infected people cough, sneeze or talk. The droplets can be inhaled, leading to pneumonia. It's less common to get pneumonia by touching an object that has germs and then touching your mouth or nose.

Check out more on how pneumonia can be spread

How do you know if your cough is a sign of pneumonia?

Pneumonia caused by bacteria can lead to a cough that has thick mucus. It can often be yellow or greenish in color – or even have a bit of blood in it. A typical pneumonia cough is deeper than your normal cough. Your cough and other symptoms will likely depend on what kind of pneumonia you have.

Learn why you should partner with your primary care provider for your health

What is walking pneumonia?

Mycoplasma pneumonia is more commonly known as walking pneumonia. It's caused by a bacteria that leads to a respiratory tract infection.

It got the name "walking pneumonia" because some people don't feel sick enough to stay home. However, they're still able to spread the disease to others.

Typically, walking pneumonia is a mild infection that doesn't require hospitalization. But some people can have severe symptoms and need antibiotics.

See why your fever or cough may be walking pneumonia

How is pneumonia different than walking pneumonia?

Pneumonia can lead to more severe symptoms than walking pneumonia. People with walking pneumonia can usually go about their normal lives. Pneumonia typically makes people feel like they just want to stay in bed – and they may even need to go to the hospital if symptoms are bad. Cough and tiredness can be symptoms for both walking pneumonia and pneumonia.

What can you do to prevent pneumonia?

To help prevent pneumonia, providers recommend that you get vaccinated for the flu if you're at high risk for pneumonia. The flu can lead to pneumonia. Children should get vaccines, such as the Hib vaccine, to prevent infections that can cause pneumonia.

Be sure to get treated for other health conditions, such as asthma, COPD, diabetes and heart disease. These can weaken your immune system, making you more at risk for pneumonia.

You should also practice healthy habits, like not smoking, limiting alcohol, eating a healthy diet and getting enough sleep. These can help keep your immune system strong. Wash your hands often or use hand sanitizer to help kill germs that can cause pneumonia.

Learn more about ways to prevent pneumonia

Check out five things that can weaken your immune system

This blog was medically reviewed by Dean Blumberg, chief of pediatric infectious diseases.