Guide

How vaccines train your immune system

Updated 18 July 2026 Part of How Things Work

A vaccine trains your immune system by showing it a safe version, piece, or instruction from a germ, so your body can recognise the real threat later. The vaccine does not need to cause the illness to teach this lesson. It gives immune cells a clear target to practise on, then leaves behind immune memory: cells and antibodies that can respond faster if the same pathogen appears again.

What your immune system learns

A pathogen is a disease-causing organism, such as a virus or bacterium. Your immune system does not fight every pathogen in the same way. It learns the shapes of particular targets on a pathogen, often proteins on its surface. These targets are called antigens.

After vaccination, immune cells inspect the antigen and start a controlled response. B cells can make antibodies, which are proteins that attach to the antigen and help block or mark the pathogen. T cells can help coordinate the response, and some can destroy infected cells.

When the training response settles, most active immune cells fade away. Some remain as memory cells. This is the useful part. If the real pathogen later enters your body, those memory cells do not start from nothing. They recognise the target and help your immune system respond sooner and more strongly.

How different vaccine types present the target

Inactivated vaccines contain a killed germ. It cannot reproduce in your body, but its antigens remain recognisable. Your immune system can study those antigens and build memory without facing an active infection. These vaccines may need repeated doses because the signal is often gentler than an infection.

Live-attenuated vaccines contain a weakened form of the germ. It can imitate a natural infection closely enough to produce a strong immune response, but it has been altered so it does not cause disease in people with healthy immune systems. Because it is still alive, this type may not suit people with severely weakened immunity.

mRNA vaccines do not contain the germ. They carry messenger RNA, a short-lived genetic instruction that tells your cells to make a harmless antigen from the pathogen. Your immune system reacts to that antigen and builds memory. The mRNA is used and then broken down by the body.

Viral-vector vaccines use a modified virus as a delivery vehicle. The vector carries instructions for making an antigen from the target pathogen. Your cells make that antigen, and your immune system learns to recognise it. The vector is not the target pathogen and is designed to act as a carrier.

Why protection can extend beyond one person

Vaccination can protect the person who receives it, but it can also reduce how easily a pathogen moves through a community. When enough people are immune, the pathogen meets fewer susceptible hosts. Transmission slows.

This is herd immunity. It matters because some people cannot be vaccinated or may not respond well to vaccines, including people with certain immune conditions, serious allergies to a vaccine component, or medical treatments that weaken immune defences. When people around them are immune, they help create barriers the pathogen must cross.

The level of community protection needed is not the same for every disease. It depends on how easily the pathogen spreads and how well immunity blocks transmission. The principle is simple: vaccines train individual immune systems, and many trained immune systems can make a community harder for a pathogen to move through.