Pneumonia is a lung infection that inflames the tiny air sacs (alveoli) in your lungs. As a result, the sacs can fill with fluid or pus, which makes breathing harder and lowers the oxygen reaching your body. Bacteria and viruses cause most cases, while fungi cause some less common ones.
Anyone can get pneumonia. However, young children, older adults and people with chronic illness or a weak immune system face a higher risk of serious illness. Therefore, knowing the symptoms of pneumonia and when to get care can help you prevent complications.

What Is Pneumonia?
Pneumonia is an infection of one or both lungs. Normally, the air sacs fill with air as you breathe. In pneumonia, however, inflammation makes them fill with fluid and pus, so oxygen cannot pass into the blood as easily.
Severity varies widely. Some people recover at home with treatment, but others need hospital care and oxygen. Sometimes doctors never identify the exact germ behind the infection.

Symptoms of Pneumonia
The signs of pneumonia range from mild to severe. Most people have a cough, which may bring up mucus, and many also have fever and chills. In addition, you may notice shortness of breath, chest pain when you breathe deeply or cough, tiredness and weakness. Some people also get headache, muscle aches, nausea, vomiting or diarrhea.
Not everyone has a fever. Older adults and people with weak immune systems may have little or no fever. Instead, they may show weakness, sudden confusion or a general decline. Chest pain also has many causes, so a professional should assess it rather than guess.
What Causes Pneumonia?
Pneumonia develops when germs reach the lungs. The main causes of pneumonia are:
- Bacteria: the leading bacterial cause in adults is Streptococcus pneumoniae (pneumococcus). However, Mycoplasma pneumoniae and Legionella can also cause it. It may start on its own or after a viral illness such as the flu.
- Viruses: influenza, RSV, SARS-CoV-2 (the COVID-19 virus) and other respiratory viruses can infect the lungs.
- Fungi: these infections are less common, but they are more likely in people with weakened immunity. Risk also depends on where you live.
- Aspiration: food, liquid, saliva or stomach contents can enter the lungs instead of the stomach. Swallowing problems or reduced consciousness raise this risk.
Types of Pneumonia
Doctors group the types of pneumonia by where you caught it and by the germ involved. Community-acquired pneumonia starts outside a healthcare setting, and it is the most common type. Hospital-acquired pneumonia, on the other hand, develops during or after a hospital stay, often in people who are already seriously ill. Ventilator-associated pneumonia develops in people on a breathing machine. Finally, doctors also name pneumonia by its cause: bacterial, viral or fungal.
The cause matters because it decides treatment. For example, antibiotics treat bacterial pneumonia, but they do not work against viruses.
Who Is at Higher Risk?
You have a higher risk of pneumonia or complications if you are 65 or older, or if you are a child under 5. Your risk also rises if you have heart, lung, liver or kidney disease, diabetes, asthma or a weakened immune system. In addition, smoking, heavy drinking and crowded places raise the risk, especially when people around you have respiratory infections.
Pneumonia in Children
Pneumonia can be serious in young children, and very young children may not show the same symptoms as adults. Therefore, watch for fast or difficult breathing, fever, cough, tiredness and poor feeding. Get urgent care if a child has trouble breathing, seems unusually sleepy, cannot drink or feed, or has bluish lips or skin.
Vaccination, good nutrition, breastfeeding in early infancy and less exposure to indoor smoke also help protect children.
Pneumonia in Older Adults
Older adults can have pneumonia without a high fever or a strong cough. Instead, sudden confusion, weakness, reduced activity or a rapid decline in health may be the first sign. Therefore, take these changes seriously and get them checked.
How Is Pneumonia Diagnosed?
A doctor starts with your symptoms, medical history and a physical exam. During the exam, the doctor listens to your lungs and checks your vital signs. Then, depending on the situation, you may need more tests. These can include a chest X-ray to look for inflammation, pulse oximetry (a finger sensor that estimates blood oxygen), blood tests to see how your body responds, and a sputum test to identify the germ. If the case is severe or complicated, you may also need a CT scan or blood cultures.
Don’t self-diagnose, because flu, COVID-19 and asthma flare-ups can look similar.
How Is Pneumonia Treated?
Pneumonia treatment depends on the cause, how severe the illness is, your age and your other health conditions.
- Bacterial pneumonia: your doctor will choose an antibiotic. Take it exactly as prescribed, and finish the course your doctor gives you.
- Viral pneumonia: antibiotics don’t help here. However, some viral infections, such as flu and COVID-19, may need antiviral medicine. Otherwise, care focuses on rest, fluids and fever control.
- Fungal pneumonia: you will need antifungal medicine, and the choice depends on the fungus and your health.
- Hospital care: if pneumonia is severe, you may need oxygen, intravenous fluids and medicines, close monitoring and, in the most severe cases, breathing support.
Can you treat pneumonia at home? Mild pneumonia often allows home care, but only after a healthcare professional has assessed you. Home care means prescribed medicine, rest, plenty of fluids and watching for worsening symptoms. Recovery time varies, and tiredness can last for weeks.
Pneumonia and Influenza
Flu and pneumonia are different illnesses, but they link closely. The flu virus can infect the lungs directly, or a bacterial infection can follow the flu. Therefore, if you get worse after a flu-like illness, or develop breathing difficulty, chest pain or a returning fever, see a doctor. Read our guide to influenza A for more.
Pneumonia and Asthma
People with asthma or other chronic lung disease have a higher pneumonia risk, and the breathing symptoms can overlap. Because the two conditions need different treatment, a doctor should check any new or worsening breathing problem. See our asthma guide for more.
How to Prevent Pneumonia
Pneumonia is not always preventable, but you can lower your risk:
- Get vaccinated. Depending on age, health and local guidance, vaccines against pneumococcal disease, flu, COVID-19, measles, Hib and whooping cough (pertussis) reduce the infections that lead to pneumonia. Ask your doctor which ones you need.
- Wash your hands after you cough or sneeze, after you care for someone who is sick, and before you eat or prepare food.
- Don’t smoke, because smoking damages the lungs’ ability to clear mucus.
- Improve indoor air. Reduce smoke from cooking or heating fuels, and ventilate your home.
- Eat well. Good nutrition supports your immune defenses, so see our healthy diet guide. For babies, breastfeeding in the first six months also helps protect against pneumonia.
When to Seek Medical Care
See a doctor if you have symptoms that could be pneumonia, especially if you are older, very young or have a health condition. Get urgent medical care if you have severe or worsening difficulty breathing, chest pain, confusion or unusual drowsiness, or bluish lips or skin. Also seek urgent care if you have a persistent or rising fever, severe weakness, trouble keeping fluids down, or a low oxygen reading on a reliable device.
Frequently Asked Questions
Is pneumonia contagious?
The germs behind it can spread from person to person, depending on the organism. However, pneumonia is not one single spreading disease, so how it spreads depends on the cause.
Can pneumonia go away on its own?
Mild infections sometimes improve, but you should always get suspected pneumonia checked. Bacterial pneumonia may need antibiotics, and severe pneumonia can become dangerous.
Do bacteria always cause pneumonia?
No. Viruses and fungi can cause it too.
Can the flu cause pneumonia?
Yes. The flu can cause viral pneumonia, and it also raises the risk of a secondary bacterial infection.
How long does recovery take?
It depends on the cause, severity, age and overall health. Many people improve within days to weeks of treatment, but fatigue can last longer.
Does pneumonia always need hospital care?
No. Hospital care is more likely when pneumonia is severe or when the person has major risk factors.
Conclusion
Pneumonia is a lung infection that bacteria, viruses or fungi can cause. It can affect anyone, but children, older adults and people with chronic conditions face the most risk. Therefore, watch for cough, fever, shortness of breath and chest pain, and get checked early. Treatment depends on the cause, and vaccination, hygiene, clean air and not smoking all help prevent it.
Medical Disclaimer
This article is for general education, and it does not replace professional medical advice, diagnosis or treatment. Do not start antibiotics, antivirals or other prescription medicines based on this article. In a medical emergency, get urgent care. Read our full medical disclaimer or contact us if you have questions about the site.
This article draws on guidance from the World Health Organization, CDC and NHLBI.