How Vaccines Work
A 6-minute read
Vaccines work by tricking your immune system into thinking it survived a disease it's never actually had.
In 1796, a country doctor named Edward Jenner noticed something peculiar: milkmaids who caught cowpox never seemed to get smallpox. Cowpox was mild. Smallpox was a death sentence for one in three people who got it. Jenner deliberately infected an eight-year-old boy with cowpox, then exposed him to smallpox. The boy didn’t get sick. Jenner had stumbled onto a principle that would eventually save hundreds of millions of lives — and he had no idea why it worked.
The short answer
Your immune system learns from exposure. When it encounters a pathogen (a virus or bacteria that causes disease), it figures out how to fight it and stores that knowledge for later. Vaccines deliver something that looks like a pathogen, or part of one, without making you sick. Your immune system responds, learns, and is ready when the real thing shows up.
The full picture
How your immune system recognizes threats
Your immune system doesn’t recognize specific viruses by name. It recognizes shapes.
Every pathogen has molecules on its surface called antigens. Think of antigens as the pathogen’s fingerprints. When your immune system encounters an antigen it doesn’t recognize, it sounds the alarm. White blood cells called B cells start producing antibodies, proteins precisely shaped to attach to that specific antigen and neutralize the pathogen.
This process takes time, usually one to two weeks the first time. That’s why you feel sick before you feel better. Your body is building its defenses on the fly.
But after the infection clears, your immune system keeps a small population of memory cells that remember the antigen. If the same pathogen shows up again, your immune system recognizes it immediately and responds within hours instead of weeks. You barely get sick, or don’t get sick at all. This is called acquired immunity.
What vaccines actually deliver
A vaccine introduces antigens (or instructions for making them) into your body without the dangerous parts of the pathogen. Your immune system can’t tell the difference. It responds the same way: builds antibodies, clears the perceived threat, and files away memory cells.
The result is immunity without the disease. You get the education without the punishment.
The four main types of vaccines
Live-attenuated vaccines use a weakened, live version of the virus or bacteria. The pathogen is real but has been altered so it can’t cause serious disease in healthy people. Your immune system gets a full, realistic workout against something very close to the actual pathogen. These produce very strong, long-lasting immunity, often for life.
Examples: measles, mumps, rubella (the MMR vaccine), chickenpox, yellow fever.
Downside: because there’s a live (if weakened) pathogen, these aren’t suitable for people with compromised immune systems.
Inactivated vaccines use a killed version of the pathogen. The virus or bacteria is grown in a lab, then killed with heat or chemicals. The dead pathogen can’t replicate or cause disease, but its surface antigens still train your immune system.
Examples: flu shots (one version), hepatitis A, polio (injectable version).
Downside: immunity tends to be less robust than live-attenuated vaccines. Boosters are often required.
Subunit vaccines skip the whole pathogen entirely. They only deliver specific pieces of it, usually surface proteins that your immune system will recognize. No live pathogen, no killed pathogen, just the relevant fingerprints.
Examples: hepatitis B, whooping cough (pertussis, part of the DTaP vaccine), shingles (Shingrix).
mRNA vaccines are the newest category, though the underlying research goes back decades — pioneered by scientists Katalin Karikó and Drew Weissman, who received the 2023 Nobel Prize in Physiology or Medicine for their foundational work on nucleoside modifications that made mRNA safe for therapeutic use. Instead of delivering a piece of the pathogen directly, mRNA vaccines deliver genetic instructions telling your cells how to build a piece of the pathogen’s surface protein. Your cells make the protein, display it, your immune system responds, and then the mRNA breaks down and disappears. Your DNA is never touched.
Examples: Pfizer-BioNTech and Moderna COVID-19 vaccines.
Advantage: can be designed and manufactured much faster than traditional vaccines. Disadvantage: requires cold storage and is newer technology with a shorter track record, though the underlying science spans more than five decades of research.
Why some vaccines need boosters
Immunity fades — for some vaccines, your antibody levels drop and your protection weakens over time, requiring a booster to restore it. Other vaccines need annual updates not because immunity fades, but because the pathogen itself mutates.
For some diseases and some vaccine types, the immune response wanes over time. Your antibody levels drop and your protection weakens.
Tetanus boosters every 10 years exist because immunity genuinely fades that much. Annual flu shots exist for a different reason: the flu virus mutates so quickly that last year’s vaccine doesn’t match this year’s circulating strains. The vaccine has to be reformulated every year.
Some vaccines provide durable, decades-long protection (hepatitis B). Others require regular reinforcement. It depends on the disease, the type of vaccine, and how your immune system responds.
Herd immunity: protection for people who can’t protect themselves
Vaccines don’t just protect the individual who gets them. They protect the community.
When enough people in a population are immune, a pathogen can’t spread efficiently. It might infect one person, but that person doesn’t encounter enough susceptible hosts to pass it on before recovering. The chain of transmission breaks.
This is herd immunity, and it matters because some people can’t be vaccinated: newborns, people with certain allergies, cancer patients, people with immune disorders. They depend on the people around them being vaccinated to avoid exposure.
The percentage of the population that needs to be immune varies by disease. According to the WHO, measles is highly contagious and requires about 95% immunity for herd protection. Polio requires about 80%.
The cold chain problem: why distribution is as hard as discovery
Creating an effective vaccine is one challenge. Getting it into arms around the world is another entirely — and for many decades, this second challenge has killed more people than the first.
Most vaccines need to stay cold. Heat breaks down the proteins and genetic material that make them work. The mRNA COVID vaccines from Pfizer-BioNTech required storage at -70°C, colder than winter in Antarctica, which made distribution in tropical countries with unreliable electricity almost impossible at launch.
This is the cold chain: the unbroken sequence of refrigerated storage and transport from manufacturer to patient. Every link matters. A vaccine stored at the wrong temperature is no longer a vaccine — it might still look fine, but it won’t work. You wouldn’t know until you saw lower protection rates in the population.
In remote parts of sub-Saharan Africa and Southeast Asia, maintaining the cold chain requires solar-powered refrigerators, ice packs resupplied by motorbike, and health workers who understand that a vial kept at room temperature for two hours is compromised. The WHO has worked for decades on “thermostability”: developing vaccines that can survive higher temperatures for longer. Gavi, the Vaccine Alliance — established in 2000 to accelerate vaccine access in lower-income countries — has helped immunize over 1.2 billion children and prevented more than 20 million deaths since its founding, in part by tackling these distribution barriers.
The measles vaccine, one of the most effective ever created, still killed an estimated 107,500 people — mostly children under five — in 2023, according to a joint CDC and WHO report. Not because it doesn’t work, but because it doesn’t reliably reach children in the places that need it most. The science has been solved. The logistics haven’t.
Why it matters
Before vaccines, diseases like smallpox, polio, and measles killed and disabled millions every year. Smallpox was eradicated entirely in 1980 — the only human disease to be deliberately wiped off the planet — through a global vaccination campaign coordinated by the WHO that involved half a billion vaccinations over a decade. Polio, once endemic worldwide, now persists in only a few countries. According to a 2024 analysis published in The Lancet, the WHO’s Expanded Programme on Immunization (EPI), founded in 1974, has saved an estimated 154 million lives over the past 50 years.
Vaccines are one of the most effective public health interventions ever developed. The math is straightforward: a small risk from a vaccine versus a much larger risk from the actual disease.
Common misconceptions
“Vaccines can give you the disease.” Live-attenuated vaccines use weakened pathogens that can very rarely cause mild illness in people with severely compromised immune systems. Inactivated and mRNA vaccines contain no live pathogen and cannot cause the disease.
“Natural immunity is always better.” Natural infection sometimes produces stronger immunity than a vaccine, but it comes with the risk of serious illness, complications, and death. Vaccination gives you immunity without rolling those dice.
“Once vaccinated, you’re fully protected forever.” Immunity from vaccines varies. Some last a lifetime, others require boosters, and some need annual updates. “Vaccinated” is not a binary permanent state.