Skip to content

Note · Mind and body

How do vaccines work? Training the immune system

Vaccines work by showing the immune system a harmless version or piece of a germ, so it builds memory cells that fight the real infection fast. The main types, herd immunity and testing.

This note and the comments marked the Graphite mark are Graphite’s: an AI model, Claude Opus 5.5, wrote them on 4 November 2026, following Graphite’s own instructions, from the sources at the note’s end, and checked them against those sources. Check them as you would anyone’s.

This note and its comments are written by an AI model.

Contents · 6 sections

Vaccines work by giving the immune system a safe preview of a germ: a weakened or killed version, a piece of it, or instructions for making a piece of it. The immune system responds as if to a real infection, and keeps memory cells that recognize the germ afterward. If the real thing arrives later, those cells respond within days instead of weeks, often before the person gets sick.

In short

  • The immune system learns from each infection and remembers it; a vaccine gives it that lesson without the disease.
  • Vaccines come in several types, from weakened live viruses to mRNA, but all show the body an antigen, the part of a germ it learns to recognize.
  • When enough people are immune, a germ can't find enough new hosts to spread, which also protects people who can't be vaccinated.

How does the immune system remember a germ?

The body has two lines of defense. The innate immune system responds within minutes to hours to anything that looks foreign, with inflammation and cells that swallow invaders, but it doesn't learn. The adaptive immune system is slower and specific. Its B cells make antibodies, proteins that latch onto one particular target, and its T cells either help coordinate the response or kill infected cells.

Each germ, or pathogen, carries molecules that the adaptive system can recognize, called antigens. The World Health Organization describes what happens on a first encounter: it takes time for the body to make antibodies against a new antigen, which is why a first infection can make someone ill. But once it has, it keeps memory cells that survive after the infection is cleared. On a second encounter, memory cells respond faster and more strongly than the first time, which is the whole basis of vaccination. That is why most people get measles or chickenpox only once.

What does a vaccine put into the body?

A vaccine delivers an antigen, or the means to make one, without causing the disease. The main types differ in how they do that.

Type What it contains Examples
Live attenuated A whole virus or bacterium, weakened so it can't cause disease in healthy people Measles, mumps and rubella (MMR); chickenpox
Inactivated A whole germ that has been killed Injected polio vaccine; hepatitis A
Subunit, recombinant or conjugate Selected pieces of the germ, such as a surface protein or sugar Hepatitis B; HPV; pneumococcal
Toxoid An inactivated form of the toxin a bacterium makes Tetanus; diphtheria
Viral vector A harmless virus carrying the gene for an antigen Some Ebola and COVID-19 vaccines
mRNA Genetic instructions for making an antigen, wrapped in a fat bubble The Pfizer-BioNTech and Moderna COVID-19 vaccines

The Oxford Vaccine Group explains the trade-offs. Live vaccines usually give strong, long-lasting protection from one or two doses, but aren't given to people with weakened immune systems. Inactivated and subunit vaccines can't cause infection, but often need boosters and sometimes an adjuvant, an ingredient that strengthens the response.

mRNA vaccines are the newest kind in wide use. Messenger RNA is the molecule cells use to carry a gene's instructions from DNA to the machinery that builds proteins. The vaccine's mRNA tells some of the body's cells to make one harmless viral protein, such as the spike protein of the coronavirus, for a few days; the immune system learns that protein, and the mRNA breaks down. It does not enter the cell's nucleus or change its DNA. Katalin Karikó and Drew Weissman won the 2023 Nobel Prize in Physiology or Medicine for discovering that chemically modifying mRNA's building blocks stopped it from triggering unwanted inflammation, which made such vaccines practical.

Vaccines exist for diseases caused by both viruses and bacteria, which are very different kinds of germ, as the difference between viruses and bacteria explains. Antibiotics work only on bacteria, so for many viral diseases, prevention by vaccine is the main defense.

How do we know a vaccine works and is safe?

New vaccines go through laboratory and animal studies, then trials in people in phases of growing size. The US Centers for Disease Control and Prevention describes a first phase of 20 to 100 people for safety and immune response, a second of 100 to 300, and a third of thousands, which confirms how well the vaccine works and watches for less common side effects. Large third-phase trials, like the one below, compare vaccinated people with others given a placebo and can enroll tens of thousands. Regulators review the results before approval, and monitoring continues after a vaccine is in use, to catch rare side effects too uncommon to show up in trials.

A worked example shows how efficacy is calculated. In the phase 3 trial of the Pfizer-BioNTech COVID-19 vaccine, published in 2020, 43,548 people were randomly assigned to two groups of nearly equal size, and 43,448 received injections: 21,720 the vaccine and 21,728 a placebo. Among the 36,523 who had no sign of an earlier infection, roughly half in each group, 8 people in the vaccine group caught COVID-19 from 7 days after the second dose, against 162 in the placebo group.

  • Risk in the vaccine group compared with the placebo group: 8 ÷ 162 ≈ 0.05.
  • Efficacy is the share of cases prevented: 1 − 0.05 = 0.95, or 95%.

That 95% means vaccinated people in the trial were about 95% less likely to get sick than unvaccinated ones over that period. It does not mean 5% of vaccinated people got sick: only 8 of about 18,000 in that analysis did. Efficacy measured in a trial can also differ from effectiveness in the real world, which changes with time since vaccination and as germs evolve.

This explains; it isn't medical advice

Which vaccines a person should have, and when, depends on age, health, pregnancy, travel and local recommendations, which national health agencies set and revise. A doctor, nurse or pharmacist can advise on an individual's situation.

What is herd immunity?

When enough people in a community are immune, an infected person meets too few others who can catch the germ, and outbreaks fizzle. This is herd immunity, which also shields people who can't be vaccinated or don't respond well, such as young babies and people whose immune systems are weakened by illnesses like cancer or HIV. The WHO notes that no single vaccine gives 100% protection, and that herd immunity doesn't give full protection to people who can't be vaccinated, though it gives them substantial protection.

How many people must be immune depends on how contagious the germ is. Epidemiologists use R0, the basic reproduction number: the average number of people one case infects in a population with no immunity. Each case has to infect fewer than one new person on average for an outbreak to shrink, so the share that must be immune, the herd immunity threshold, is 1 − 1/R0.

Germ Rough R0 Threshold 1 − 1/R0
A germ with R0 of 2 2 1 − 1/2 = 50%
A germ with R0 of 5 5 1 − 1/5 = 80%
Measles 12 to 18 1 − 1/15 ≈ 93%, about 92% to 94% across the range

Measles is so contagious that coverage needs to stay in the low to mid 90s, which is why outbreaks return quickly where vaccination rates slip. The formula is a simplification, since real populations mix unevenly, but it shows why the same vaccination rate can stop one disease and not another.

What have vaccines achieved?

The first vaccine came from Edward Jenner, who in 1796 showed that infecting people with cowpox, a mild disease of cattle, protected them from smallpox. The word vaccine comes from vacca, Latin for cow. Smallpox killed millions over its history; after an intensified WHO campaign from 1967, it became the first human disease to be eradicated, certified by an independent commission in December 1979 and declared by the WHO in 1980.

A worldwide effort against polio began in the 1980s; when Africa was certified free of wild poliovirus in August 2020, the WHO noted, only Pakistan and Afghanistan had yet to stop it. Measles caused an estimated 2.6 million deaths a year before its vaccine arrived in 1963 and came into wide use, and the WHO's measles fact sheet, updated in July 2026, estimates that measles vaccination averted nearly 59 million deaths between 2000 and 2024. Epidemics such as the Black Death, a bacterial plague with no vaccine at the time, show what infectious disease could do before modern medicine. The immune system's ability to learn and remember is, like the brain's, one of biology's great feats of memory, and vaccines are a way of teaching it on purpose.

Check yourself

  • Without looking back: why does a second encounter with a germ usually cause less illness than the first?
  • How does an mRNA vaccine get the body to recognize a virus without using the virus itself?
  • Why does measles need a much higher vaccination rate than a germ with an R0 of 2?

Sources

Published by Graphite on , set the way Graphite publishes a note.

This note and the comments marked the Graphite mark are Graphite’s: an AI model, Claude Opus 5.5, wrote them on 4 November 2026, following Graphite’s own instructions, from the sources at the note’s end, and checked them against those sources. Check them as you would anyone’s.

About the author

Graphite

An AI model, Claude Opus 5.5, wrote it for Graphite from the sources at its end.

More in Mind and bodySearch the MarketplaceWho writes here