HomeExplainers › Medicine

Medicine

How Vaccines Work: The Science Behind Immunity

Open Brief Staff July 1, 2026 7 min read
Key points

Your immune system is essentially a biological security apparatus with two layers. The first layer is always on: it identifies and attacks anything that looks foreign through a set of general-purpose mechanisms. The second layer is far more sophisticated. It learns, remembers, and produces targeted weapons for specific threats. Vaccines work by training this second layer without putting you at risk from the disease itself.

The innate immune response

When a pathogen enters the body, the innate immune system responds within minutes to hours. White blood cells called macrophages and neutrophils engulf and destroy invaders. Natural killer cells target infected cells. The system triggers inflammation — the heat, redness, and swelling that are familiar signs of infection — which concentrates immune cells at the site of intrusion and raises the local temperature to slow pathogen replication.

The innate response does not distinguish between types of pathogen with any precision. It recognises broad patterns — molecular features common to bacteria or viruses — and responds accordingly. This is fast but not specific enough to defeat pathogens that evolve to evade it, or to produce lasting immunity.

The adaptive immune response

The adaptive immune system takes longer to activate — days rather than minutes — but it learns. The key players are B cells and T cells. When B cells encounter a specific antigen (a molecular marker on a pathogen surface), they are activated to multiply and produce antibodies: proteins precisely shaped to bind to that antigen. When the antibody attaches to a virus, it can block the virus from entering cells, mark it for destruction by other immune cells, or neutralise its toxic products.

T cells play complementary roles. Helper T cells amplify the response and support B cell activation. Cytotoxic T cells hunt down and destroy body cells that have already been infected, cutting off the pathogen’s route to replication. Together, B cells and T cells mount the precise, coordinated response that clears an infection the innate system cannot handle alone.

What vaccines do to this system

A vaccine presents the immune system with an antigen — or the means to produce one — in a form that cannot cause disease. The immune system responds as if it were a genuine infection, mounting both innate and adaptive responses. Then it does something critical: it retains memory cells.

Memory B cells and memory T cells are long-lived cells that encode the ability to recognise a specific antigen. They can persist in the body for years, sometimes decades. If the real pathogen ever appears, these memory cells enable a much faster and more powerful response: rather than the slow primary response that takes days to build, the immune system can respond within hours and at a scale that overwhelms the pathogen before it causes serious illness.

Different vaccine platforms, same principle

Vaccines use several different technologies to deliver the antigen, but the underlying immunological goal is the same.

Why vaccines sometimes require boosters

The strength and duration of vaccine-induced immunity depends on how well the antigen provokes the immune system, how much the pathogen changes over time, and individual factors such as age and underlying health. Some vaccines — tetanus, for example — produce strong initial responses that wane, requiring periodic boosters to maintain protective antibody levels. Others, like the measles vaccine, produce lifelong immunity in most people from a single course. And some pathogens, like influenza, change their surface antigens so rapidly that the vaccine must be reformulated each year to match the strains currently circulating.

Herd immunity and why coverage matters

When enough of a population is immune to a pathogen, the pathogen cannot find enough susceptible hosts to sustain transmission. This is called herd immunity, and it matters for people who cannot be vaccinated — very young infants, people with certain immune conditions — because they are protected by the immunity of those around them. The threshold coverage needed for herd immunity varies by how contagious the disease is. For measles, which spreads very efficiently, approximately 95 percent coverage is needed.

The short version

Vaccines work by priming the adaptive immune system with an antigen that does not cause disease. The system responds, produces antibodies, and creates long-lived memory cells that allow a fast, powerful response when the real pathogen arrives. Different vaccine platforms deliver the antigen by different means, but all exploit the same fundamental property of immunological memory.