How does the immune system work?

Last updated:
We encounter threats like bacteria, viruses and fungi every day, but they don’t always make us sick. For that, we have our immune system to thank. But how does it protect us?

Need to speak to a GP today?

Book appointment

The immune system is one of our body’s hardest-working systems. All organisms – from bacteria to sea sponges to apes – have some form of immune system to defend them from harm.

We still don’t know exactly how our immune system works, but we know its aim: to protect us from anything that could hurt us.

It’s a simple goal, but our immune system uses some sophisticated strategies to keep us safe. Here’s what you need to know.

What is the immune system?

The immune system is made up of cells, tissues and organs that work together to protect you from infections and other harmful substances. Its goal is to identify and kill anything in your body that shouldn’t be there.

When everything goes to plan, your immune system defends you from all kinds of attacks without you noticing. But if things stop running smoothly or you encounter a particularly clever or aggressive invader, you get sick.

What are the different parts of the immune system?

The immune system has 2 branches: the innate immune system and the adaptive immune system.

1. The innate immune system

We’re born with the ability to defend ourselves from invaders. Our innate immune system arms us with non-specific protection against any kind of germ or harmful substance. This first line of defence includes:

  • Physical barriers like skin and mucous membranes
  • Chemical barriers like bacteria-killing enzymes in our snot, tears and stomach acid
  • Immune cells - such as phagocytes
  • Antibodies

If a germ manages to get past our innate immunity, our adaptive immune system steps up.

2. The adaptive immune system

Your adaptive immune system takes a more specialised approach. It learns and ‘remembers’ the specific germs you’ve been infected by, allowing you to launch a quicker counterattack the next time they intrude. Scientists call this ‘immunological memory’.

The main defenders in your adaptive immune system are lymphocytes, a white blood cell, (called B cells and T cells) and antibodies.

B cells

B cells are made in the bone marrow. They specialise in making antibodies. There are many different types of B cells that make antibodies against particular threats.

T cells

T cells are also formed in the bone marrow but mature in the thymus, a small organ in your chest. There are a few different kinds:

  • Helper T cells signal to other immune cells to join the fight against an infection
  • Killer, or cytotoxic, T cells detect and kill infected cells or cancerous cells
  • Memory T cells remember pathogens you’ve previously been infected by


Antibodies, also known as immunoglobulins, are Y-shaped proteins that circulate in your bloodstream, patrolling for intruders. When they find something harmful, they’ll latch on. This ‘neutralises’ the infection, making it harder for the germ to hurt you. It also signals to your immune cells that there’s an intruder to fight off.

Anything that triggers your body to make antibodies is called an antigen, short for antibody generator. An antibody will only attach to an antigen if it matches it perfectly, like a lock and key. This is how your immune system recognises particular intruders. Your body makes specialised antibodies that match specific germs and other threats.

There are 5 different types of immunoglobulins - IgG, IgM, IgA, IgD and IgE - and each has a specific job to do. For instance, IgG and IgM go into organs on the hunt for intruders whilst IgA is found in mucus.

If your body encounters something for the first time, it can take time for your immune system to create an antibody that fits the antigen and, until it does so, you can become ill.

How does vaccination work?

Your immune system’s memory is the reason why vaccines work. Vaccines contain a dead or weakened version of a pathogen, which stimulates your immune system to make antibodies that match it. This gives your adaptive immune system the upper hand the next time you’re exposed to the same pathogen, since it’s already made the antibodies.

What is inflammation​?

Inflammation happens as your immune system mounts a counterattack against a threat. Your blood vessels dilate to bring more blood to an area of injury or infection, carrying white blood cells ready for battle. This extra blood flow leads to redness and swelling. Your white blood cells release chemicals called cytokines that attack any invaders.

While inflammation helps you fight off an infection, it’s also what makes you feel sore, feverish and ill. Some degree of inflammation is necessary, but too much can be dangerous.

A cytokine storm is when your innate immune system launches too many defences at once, which is why we sometimes use medicine to keep inflammation under control.

What happens when the immune system goes wrong?

Our immune system is constantly on patrol, checking out anything new that enters our bodies and deciding whether or not to let it pass by in peace.

Allergies and autoimmune diseases are all a result of our immune system mistaking harmless or even beneficial things for a threat.

Autoimmune diseases

Your immune system has to be able to recognise what’s part of you and what’s not. Autoimmune diseases happen when your immune system mistakes itself for an invader and attacks. It’s estimated around 5% of people have an autoimmune disease. These include:


An allergy is an overreaction of the immune system to a harmless substance. It’s predicted that by 2025, over half the European population will have at least one allergy.

Some of the most common types of allergens are:

  • Antibiotics
  • Pollen
  • Food
  • Latex
  • Insect stings

When should I speak to a doctor?

While there’s a wide range of immune disorders with a variety of effects, here are some signs that you may need to speak to a doctor:

  • Joint pain and swelling
  • Abdominal pain or digestive issues
  • Recurring fever
  • Swollen glands

This article has been medically reviewed by Dr Bryony Henderson, Lead GP at Livi.

Get expert advice and tips

Sign up to get the best of our health content delivered right to your inbox.