How Vaccines Work: Immunity, Types, and the Science of Vaccination

A comprehensive, evidence-based explanation of how vaccines train the immune system, the different types of vaccines in use today, how they are developed and tested, and their role in preventing infectious disease.

The InfoNexus Editorial TeamMay 3, 202610 min read

What Is a Vaccine?

A vaccine is a biological preparation that trains the immune system to recognize and fight a specific pathogen — typically a virus or bacterium — without causing the disease itself. By exposing the immune system to a harmless version, fragment, or instruction set related to a pathogen, vaccines trigger the production of a targeted immune response. If the vaccinated person later encounters the real pathogen, their immune system can respond quickly and effectively, preventing or greatly reducing the severity of illness.

Vaccination is widely regarded as one of the most successful public health interventions in history. It has led to the global eradication of smallpox (declared eradicated in 1980), the near-elimination of polio from most of the world, and the prevention of hundreds of millions of deaths annually. This article is for educational purposes. Consult a qualified healthcare provider for personal medical advice regarding vaccination.

The Immune System: A Brief Primer

To understand how vaccines work, it helps to understand the basics of immunity:

  • Innate immunity: The body's immediate, non-specific first line of defense. It responds quickly to any foreign invader through inflammation, fever, and the action of cells like neutrophils and macrophages.
  • Adaptive immunity: A slower but highly specific response. Two key cell types are central: B cells, which produce antibodies — proteins that bind to specific molecular targets (antigens) on pathogens — and T cells, which can directly destroy infected cells (cytotoxic T cells) or help coordinate the immune response (helper T cells).
  • Immunological memory: After an infection or vaccination, some B and T cells become long-lived memory cells. If the same pathogen is encountered again, these memory cells enable a much faster and stronger response — often eliminating the pathogen before symptoms appear.

Vaccines work by triggering adaptive immunity and generating immunological memory without the risks of actual infection.

Types of Vaccines

There are several distinct vaccine platforms, each with different mechanisms, advantages, and limitations:

1. Live-Attenuated Vaccines

These vaccines use a weakened (attenuated) form of the live pathogen. Because the pathogen can still replicate — just very poorly — live-attenuated vaccines typically generate a strong and long-lasting immune response, often providing lifelong protection with one or two doses.

  • Examples: MMR (measles, mumps, rubella), yellow fever, chickenpox (varicella), oral rotavirus
  • Limitation: Cannot be given to immunocompromised individuals, as the weakened pathogen could cause illness.

2. Inactivated Vaccines

The pathogen is killed (inactivated) using heat or chemicals, then injected. Because it cannot replicate, the immune response is generally weaker and multiple doses or periodic boosters are required.

  • Examples: Inactivated polio vaccine (IPV), flu shot (some formulations), hepatitis A, rabies

3. Subunit, Recombinant, and Conjugate Vaccines

Instead of the whole pathogen, these vaccines contain specific pieces of it — typically proteins from the pathogen's surface (antigens) — that are sufficient to trigger an immune response.

  • Subunit vaccines: Hepatitis B, pertussis component of DTaP, shingles (Shingrix)
  • Conjugate vaccines: Link a weak antigen to a carrier protein to boost immune response; used for pneumococcal (PCV), meningococcal, and Haemophilus influenzae type b (Hib) vaccines

4. Toxoid Vaccines

Some bacteria cause disease through toxins rather than direct infection. Toxoid vaccines contain inactivated versions of the toxin (toxoids), training the immune system to neutralize it.

  • Examples: Tetanus, diphtheria (both components of DTaP/Tdap)

5. mRNA Vaccines

This platform, which achieved large-scale deployment for the first time with the COVID-19 vaccines developed by Pfizer-BioNTech and Moderna in 2020–2021, delivers genetic instructions (messenger RNA) encoding a specific pathogen protein — typically a surface antigen like the SARS-CoV-2 spike protein. The body's own cells read these instructions and produce the protein, which triggers an immune response. The mRNA itself does not enter the cell nucleus, cannot alter DNA, and is degraded within days.

  • Examples: Pfizer-BioNTech BNT162b2 (COVID-19), Moderna mRNA-1273 (COVID-19)
  • Advantages: Rapid development timeline (design to clinical trial in weeks); highly adaptable to new variants; no need to grow live pathogen

6. Viral Vector Vaccines

A harmless virus (the vector) is modified to carry genetic instructions for a target antigen. The vector infects cells and causes them to produce the antigen, triggering immunity.

  • Examples: Oxford-AstraZeneca AZD1222 (COVID-19), Johnson & Johnson Ad26.COV2.S (COVID-19), Ebola vaccine (rVSV-ZEBOV)

How Vaccines Are Developed and Tested

Vaccine development follows a rigorous, multi-stage process before any product is authorized for public use:

PhaseDescriptionTypical Duration
PreclinicalLaboratory and animal testing; basic safety and immune response data1–6 years
Phase I Clinical TrialSmall group of healthy adults (20–100); primary goal: safety and dosing1–2 years
Phase II Clinical TrialLarger group (hundreds); safety, immunogenicity, dosing schedule2–3 years
Phase III Clinical TrialThousands to tens of thousands; effectiveness against disease, rare side effects2–4 years
Regulatory ReviewNational regulatory agency (FDA, EMA, WHO prequalification) evaluates all data1–2 years
Post-Authorization SurveillanceOngoing monitoring for rare adverse events in the general populationContinuous

The COVID-19 vaccines completed this process in under a year — not by skipping steps, but through unprecedented parallel resourcing (multiple phases run simultaneously), enormous trial sizes, and regulatory priority review. Long-term safety monitoring continues.

Herd Immunity

When a sufficiently large proportion of a population is immune to an infectious disease — through vaccination or prior infection — the pathogen cannot spread efficiently, protecting even those who cannot be vaccinated (such as newborns, the immunocompromised, or people with certain allergies). This is called herd immunity (or population immunity).

The vaccination coverage needed to achieve herd immunity depends on how contagious the disease is, expressed as the basic reproduction number (R₀):

DiseaseR₀ (approx.)Herd Immunity Threshold
Measles12–18~95%
Mumps4–7~85%
Polio5–7~80–85%
COVID-19 (original strain)2–3~60–70%
COVID-19 (Omicron)8–15~90%+

Vaccine Safety and Adverse Effects

All approved vaccines undergo extensive safety testing, and serious adverse events are rare. Common reactions — soreness at the injection site, mild fever, fatigue — are signs that the immune system is responding and typically resolve within one to two days.

Rare but serious adverse events — such as myocarditis associated with mRNA COVID-19 vaccines (occurring in approximately 1–4 per 100,000 doses, primarily in young males after the second dose, and typically mild and self-resolving) — are detected through post-market surveillance systems such as the U.S. Vaccine Adverse Event Reporting System (VAERS) and the Vaccine Safety Datalink (VSD). The benefit-risk balance of approved vaccines is continuously evaluated by regulatory agencies.

The claim that vaccines cause autism originated from a 1998 study by Andrew Wakefield that was subsequently found to be fraudulent, leading to Wakefield's loss of medical license. This study has been retracted, and numerous large-scale independent studies involving millions of children have found no link between vaccines and autism.

Vaccination remains one of the most rigorously tested and effective medical interventions available — a cornerstone of modern public health that continues to save millions of lives each year.

vaccinesimmunologypublic healthinfectious disease