Skip to content
The Long ViewFaith, history and everyday life
Science & Nature

How vaccines work

A vaccine shows your immune system a harmless germ or piece of one, so it learns to recognize it and builds memory without causing the disease.

How vaccines work
Photo geralt / Pixabay

A vaccine works by showing your immune system a harmless form or a piece of a germ, so the body learns to recognize it and builds a memory of it without causing the disease. If the real germ shows up later, the immune system has already practiced. That is the core idea, and the rest of this page explains how each step happens.

The vaccine idea in four steps

Exposure
The body meets a harmless antigen.
Recognition
The immune system flags it as foreign.
Response
Antibodies and immune cells are produced.
Memory
Memory cells wait for a future exposure.
Schematic overview. Sources are named at the end of the article.

What Is a Vaccine

A vaccine is a substance that trains the immune system to recognize and fight a specific disease. The key word is training. The body gets to learn about a threat without going through the illness itself.

To do this, a vaccine exposes the body to a harmless form of a pathogen, or to one of its components. The part that triggers the immune system is called the antigen. It is the active ingredient in the sense that matters most: the antigen is what prompts the body to produce antibodies.

That is why vaccines are described as teaching tools rather than as treatments. They do not fight an infection that is already underway. They prepare the immune system ahead of time, so it is not meeting the germ for the first time when the real exposure happens.

Key figuresTime for a natural infection to trigger complete immune response7 to 14daysFlu vaccine efficacy in adults aged 18 to 6559%COVID-19 vaccine efficacy range depending on the endpoint measured50,3 to 100%

How Your Immune System Naturally Defends Itself

To understand a vaccine, it helps to see what the body does on its own. When a germ gets in, the immune system has to recognize it as foreign. Once it does, it produces antibodies and activates immune cells to fight the invader.

Also read: Why we have seasons

This takes time. A natural infection needs 7 to 14 days to set off a complete primary immune response. During that window, the germ can multiply, and the person can become ill. That delay is the problem a vaccine is designed to get around.

After the body has fought off a germ, some of the immune cells stay behind as memory cells, including memory T cells and B cells. They are what allow a faster, better-prepared response the next time. A vaccine aims to produce exactly this memory, but through a safe encounter instead of a real illness.

How Vaccines Train Your Immune System

The process follows a simple sequence. First, the vaccine presents an antigen in a safe context. Second, the immune system recognizes that antigen as foreign. Third, it mounts a response, producing antibodies and activating immune cells. Finally, memory cells remain, ready to recognize the pathogen if it appears later.

The important difference from natural infection is the setting. A natural infection requires 7 to 14 days to build a full primary response while the germ is active in the body. A vaccine compresses that learning phase by showing the antigen in a controlled way, so the immune system does its practice before it faces the real thing.

Learning the hard way or the safe way

Natural infection: primary response in 7 to 14 days

Vaccination: the learning phase happens ahead of exposure, with an antigen presented in a safe context

Illustrative bars, not to scale. The 7 to 14 day figure is the one reported for a primary response to natural infection.

None of this means a vaccine is a switch that guarantees an outcome. It means the immune system gets a head start. How strong that head start is depends on the vaccine, the disease, and the person, as the next sections show.

Five Main Types of Vaccines

Not every vaccine uses the same approach to present the antigen. There are five main types, and each one shows the immune system something different.

Live-attenuated: uses a weakened form of the germ.

Inactivated: uses germs that have been inactivated or killed.

Subunit: uses only parts of the germ, such as proteins or sugars.

Toxoid: uses a harmless form of a toxin made by a bacterium.

mRNA: uses messenger RNA that instructs the body’s own cells to produce the antigen.

A live-attenuated vaccine presents the whole germ, but in a weakened form. An inactivated vaccine presents the whole germ too, only inactive or killed. The trivalent inactivated influenza vaccine is an example of the inactivated approach.

A subunit vaccine goes further and shows only selected pieces, which are enough for the immune system to recognize. A toxoid vaccine targets the toxin rather than the bacterium itself. In that case, a harmless form of the toxin teaches the body to respond to the real one.

The mRNA approach is different in kind. Instead of delivering the antigen, the vaccine delivers instructions. The messenger RNA tells the body’s cells to make the pathogen’s antigenic protein, and that protein triggers the immune response. Your cells produce the protein; the vaccine supplies the instructions.

This page does not rank these types against each other. Comparing their efficacy or safety is a separate question, and it deserves its own careful treatment rather than a quick verdict here.

How Vaccine Efficacy Is Measured and What the Numbers Mean

Efficacy figures are easy to misread. A number such as 59% does not mean that 59% of people are protected and the rest are not. It describes a reduction in risk, not absolute protection. A vaccine can lower the chance of a given outcome without removing it entirely.

Efficacy also varies. It depends on the vaccine, on the target disease, and on the population studied. For influenza, the pooled efficacy of the trivalent inactivated vaccine in adults aged 18 to 65 is 59%. For COVID-19 vaccines, efficacy reported in clinical trials ranges from 50.3% to 100%, depending on the endpoint measured, such as symptomatic infection or severe infection.

Reported efficacy figures

Influenza, trivalent inactivated vaccine, adults 18 to 65 (pooled): 59%

COVID-19 vaccines in clinical trials, lowest reported endpoint: 50.3%

COVID-19 vaccines in clinical trials, highest reported endpoint: 100%

Different diseases, populations and endpoints. These bars are not a ranking.

The wide COVID-19 range shows why the endpoint matters. A trial can measure whether someone develops symptoms, or whether someone develops severe disease. Those are different questions, and they can produce different numbers for the same vaccine.

Efficacy and effectiveness are also not the same thing. Efficacy describes how a vaccine performs in the controlled conditions of a trial. Effectiveness describes how it performs in everyday use. Percentages can shift with the population, the year, and the variant, so any single figure is a snapshot, not a permanent value.

Why Boosters Are Sometimes Needed

Immune memory is not always permanent. Vaccine efficacy can decrease over time after the primary vaccination. That is the reason some vaccines come with booster doses: to help maintain protection that would otherwise fade.

This is a normal, measured feature of how immunity behaves, not a flaw in the idea of vaccination. Researchers track how protection changes after the first doses, and that evidence is what supports the use of boosters for certain vaccines. Whether a booster is relevant for you is a question for a healthcare provider, since it depends on the vaccine and your situation.

The Development Process Behind Vaccination

Vaccines are not produced by guesswork. Their efficacy figures come from clinical trials, where researchers measure specific outcomes in defined groups of people and report them with the endpoint attached. That is why the numbers above come with so many qualifiers: they are the output of structured measurement.

Measurement continues after the trials. Studies look at how protection holds up over time, which is how the evidence about declining immunity and boosters was gathered. The process is meant to be rigorous because the questions it answers are specific: how well a vaccine works, for whom, and for how long.

Where to Go From Here

This article covers the mechanism, not the choices. Which vaccines are appropriate depends on age, health status, and location, and those decisions belong in a conversation with a healthcare provider.

Nora Ellison

Written by

Nora Ellison

Health, science and nature

Nora covers health habits, the night sky and the natural world. She explains research in plain words, cites it, and reminds readers that a doctor who knows them comes before any article.

More from Nora

Keep reading in Science & Nature

The whole section
Science & Nature

Why we have seasons

Seasons come from Earth's 23.5° axis tilt, not its distance from the Sun. Learn how tilt changes sunlight angle and day length through the…

Science & Nature

How rainbows form

Learn how sunlight bends, reflects, and bends again inside raindrops to create a rainbow, and why you must have the sun behind you to…