Most of the time you don’t notice your immune system at all, which means it’s doing its job. Every day it identifies and destroys bacteria, viruses, fungi and damaged cells. Understanding how it works makes it easier to see why sleep, food, exercise and vaccines matter so much.
Key takeaways
- The immune system has two arms: innate (fast, general) and adaptive (slower, targeted, with memory).
- Your skin, mucus, stomach acid and gut bacteria are the first line of defence.
- Antibodies and memory cells are why you usually only get some infections once, and why vaccines work.
- Lifestyle has a real effect: sleep, diet, activity, weight, stress and smoking all influence immunity.
The parts of the immune system
| Part | Role |
|---|---|
| Skin and mucous membranes | Physical barriers that keep germs out; mucus and tiny hairs trap and sweep them away |
| White blood cells | The immune system’s main workforce, made in the bone marrow |
| Lymph nodes and lymphatic vessels | A network that carries immune cells and filters germs; nodes swell when they’re busy |
| Spleen | Filters the blood and stores white blood cells |
| Thymus | Where T cells mature, mainly in childhood |
| Gut and its bacteria | Around 70% of immune tissue sits in the gut; healthy bacteria help train and regulate it |
| Tonsils and adenoids | Catch germs entering through the mouth and nose |
Innate immunity: the first responders
You’re born with innate immunity. It reacts within minutes to hours and treats all invaders in much the same way. Barriers like skin and stomach acid block entry; cells called neutrophils and macrophages swallow and destroy germs; and inflammation brings extra cells and fluid to the site. Fever is part of this response too: a higher temperature makes it harder for many germs to multiply. Read more in our guide to inflammation.
Adaptive immunity: the specialists
Adaptive immunity learns. It takes several days to ramp up the first time it meets a new germ, but it’s highly targeted and it remembers.
- B cells produce antibodies, proteins that lock onto a specific germ and mark it for destruction.
- Helper T cells coordinate the response.
- Killer T cells destroy infected cells.
- Memory cells stay in the body for years so that the next time the same germ appears, the response is fast and strong, often before you feel ill.
This memory is why vaccines work: they safely show the immune system what a germ looks like so it’s ready if the real thing arrives.
Why the immune system sometimes struggles
- New or changing germs: cold and flu viruses change often, so earlier immunity may not fully protect you.
- Age: young children are still building immune memory; immunity also gradually weakens in older age.
- Lifestyle: short sleep, chronic stress, smoking, heavy drinking, poor diet, inactivity and obesity all weaken defences.
- Medical conditions and treatments: diabetes, chemotherapy, steroids and some other medicines can suppress immunity.
- Overreaction: allergies are the immune system reacting to harmless things; in autoimmune diseases it attacks the body’s own tissues.
How to support your immune system
- Sleep 7–9 hours a night.
- Exercise moderately most days.
- Eat a varied diet with plenty of vegetables, fruit, whole grains, beans and enough protein.
- Keep a healthy weight.
- Manage stress and stay socially connected.
- Don’t smoke; keep alcohol low.
- Wash your hands and keep vaccinations up to date.
Each of these is covered in detail in how to strengthen your immune system and foods for the immune system.
Free tool
Sleep Calculator — work out the best time to go to bed for a full night’s sleep.
Free tool
BMI Calculator — a quick check of whether your weight is in a healthy range.
Frequently asked questions
Why do I get sick more often when I’m stressed?
Long-term stress raises cortisol, which suppresses parts of the immune response. Stress also tends to disrupt sleep and eating habits.
Why do swollen glands happen?
Lymph nodes swell as they fill with immune cells fighting an infection nearby. They usually go down within a couple of weeks; see a doctor if they don’t.
Does a fever mean my immune system is working?
Yes, a fever is part of the normal immune response. Seek medical advice for very high fevers, fevers lasting more than a few days, or any fever in a young baby.
Further reading from trusted sources: see our immune system resources.
This article is for general information and isn’t a substitute for advice from your doctor or another qualified health professional. Check with them before starting a new exercise or eating plan, especially if you have a health condition, are pregnant or take medication.