Vaccines provide active immunity, meaning they train your immune system to defend itself by producing its own antibodies and memory cells. This is the same category of immunity your body builds after surviving an actual infection, but vaccines achieve it without the risks of the disease itself. The CDC classifies this specifically as “vaccine-induced active immunity,” distinguishing it from the “natural active immunity” you’d get from being infected.
The distinction matters because active immunity is long-lasting. Unlike passive immunity, where you receive someone else’s antibodies temporarily, vaccine-induced immunity teaches your body to manufacture its own defenses and, critically, to remember how to do it again.
Active Immunity vs. Passive Immunity
There are really only two broad categories of immunity: active and passive. Active immunity means your own immune system did the work. It encountered something foreign, mounted a response, built antibodies, and stored the blueprint in memory cells for next time. Vaccines trigger this process by introducing a harmless version of a pathogen (or a piece of one) so your body can practice.
Passive immunity is borrowed protection. The clearest example is a newborn baby receiving antibodies from its mother. These maternal antibodies, mostly a type called IgG, cross the placenta before birth and shield the infant during the first months of life while its own immune system matures. Breast milk adds another layer, supplying a different antibody type that protects the gut. But this borrowed shield fades. In humans, maternal antibodies typically wane over 6 to 12 months, which is one reason infant vaccination schedules begin when they do. By around 12 months, maternal antibodies have largely disappeared, creating an optimal window for vaccines to stimulate the baby’s own immune response without interference.
The key difference: passive immunity provides no memory. Once those borrowed antibodies break down, the protection is gone. Active immunity from a vaccine can last years, decades, or in some cases a lifetime, because your immune system retains the ability to recognize and respond to the threat.
How Vaccines Build Your Defenses
When a vaccine enters your body, it sets off a coordinated chain of events involving two main branches of your immune system. The first produces antibodies. The second trains cells to directly attack infected cells. Together, they form a layered defense.
Antibody production starts with B cells, a type of white blood cell that can recognize foreign proteins. When B cells encounter the vaccine’s target protein, they activate and begin a remarkable refinement process. Inside structures in your lymph nodes called germinal centers, B cells rapidly multiply and undergo random mutations in the genes that code for their antibody shape. The cells whose mutations happen to produce a tighter fit to the target protein get selected to survive and keep dividing, while less effective versions die off. This Darwinian competition, repeated over cycles, produces increasingly precise antibodies. Some of these B cells become short-lived antibody factories that flood your bloodstream with protection right away. Others become long-lived plasma cells or memory B cells that persist for years.
The cellular side of the response involves T cells. Helper T cells (sometimes called CD4 cells) act as coordinators. They boost B cell activity, help establish long-term memory, and support the survival and function of killer T cells. Killer T cells (CD8 cells) handle a different job entirely: they identify and destroy cells that have already been infected by a pathogen. They do this by releasing toxic molecules that punch holes in infected cells or trigger them to self-destruct. Without adequate helper T cell support, killer T cells produce fewer of these toxic molecules, die off faster, and struggle to control infections effectively.
Why Different Vaccines Produce Different Immunity
Not all vaccines stimulate the immune system equally. The type of vaccine determines how broad, how strong, and how long-lasting the resulting immunity will be.
Live-attenuated vaccines use a weakened but still living version of the pathogen. Examples include the measles, mumps, and rubella (MMR) vaccine and the chickenpox vaccine. Because the weakened virus actually replicates inside your body, your immune system treats it almost identically to a real infection. It activates both antibody production and cellular immunity. The CDC notes that the immune response to a live-attenuated vaccine is “virtually identical to that produced by a natural infection.” Most people develop strong immunity from a single dose.
Inactivated and subunit vaccines take a more conservative approach. These use killed pathogens, pieces of pathogens, or inactivated toxins. Examples include the hepatitis A vaccine, flu shots, tetanus and diphtheria toxoids, and the HPV vaccine. Because nothing is replicating inside you, the immune response is narrower. It generates mostly antibodies with little or no cellular immunity. Antibody levels also decline faster over time, which is why these vaccines typically require multiple doses and periodic boosters to maintain protection.
mRNA vaccines, like those developed for COVID-19, work differently again. They deliver genetic instructions that tell your cells to temporarily produce a target protein from the pathogen. Your immune system then responds to that protein. These vaccines activate innate immune cells (the body’s first responders, including certain white blood cells that engulf foreign material) which then present the protein to the adaptive immune system, triggering both antibody and T cell responses. The innate response also produces signaling molecules that help drive the formation of germinal centers where high-quality antibodies are refined.
Sterilizing vs. Protective Immunity
One common source of confusion is the difference between a vaccine that prevents infection entirely and one that prevents serious illness. These represent two different levels of immunity.
Sterilizing immunity means a pathogen is eliminated before it can even replicate inside you, ideally right at the point of entry. If you have sterilizing immunity, you won’t get infected and you won’t transmit the pathogen to others. Some vaccines, particularly those against measles and rubella, come close to achieving this in most people.
Protective immunity is more common. Here, the pathogen does manage to establish a foothold and replicate to some degree, but your memory cells kick in quickly enough to limit the damage. You might experience no symptoms at all, or only mild illness. This is what most COVID-19 vaccines provide after antibody levels have waned: they don’t reliably prevent infection, but they significantly reduce the risk of severe disease because memory B and T cells can rapidly mobilize a secondary response.
Which level of immunity you get depends on several factors: the overall strength and quality of the memory response the vaccine generated, how much time has passed since vaccination (and whether antibody levels have declined), and the incubation period of the pathogen. A slow-moving pathogen gives your immune memory more time to respond before infection takes hold. A fast-replicating one, like measles, demands that high antibody levels already be circulating at the moment of exposure.
How Long Vaccine Immunity Lasts
There’s no single answer because it depends on the vaccine. Some provide decades of protection. The measles vaccine, for instance, is considered to confer lifelong immunity in most people after two doses. The hepatitis B vaccine generates protection that lasts 20 years or more in the majority of recipients. On the other end of the spectrum, flu vaccines are reformulated and re-administered annually, partly because the virus mutates rapidly and partly because antibody responses to inactivated vaccines fade relatively quickly.
The durability of immunity comes down to what happens after the initial response winds down. Long-lived plasma cells settle in the bone marrow and can continue producing low levels of antibodies for years without any further exposure to the pathogen. Memory B cells, meanwhile, remain dormant in lymph tissues but are primed for rapid reactivation. When they encounter the same pathogen again, they can quickly differentiate into new antibody-producing cells or generate a fresh wave of memory cells, mounting a faster and stronger response than the original vaccination produced.
This system does have limits. Antibody concentrations naturally decline over time after any vaccination. In older adults, the memory response tends to be weaker because aged memory B cells are less efficient at transforming into antibody-producing cells upon restimulation. This is one reason booster doses become more important with age, and why vaccines for older populations sometimes use higher doses or added immune-stimulating ingredients to compensate.
Community-Level Protection
Vaccine-induced immunity doesn’t just protect the individual. When enough people in a population are immune, a pathogen can’t find enough susceptible hosts to sustain transmission. This is herd immunity, and it shields people who can’t be vaccinated, such as newborns or those with compromised immune systems.
The threshold varies by disease and depends on how contagious the pathogen is. Measles, one of the most transmissible infectious diseases known, requires roughly 95% of a population to be immune before transmission is reliably interrupted. Polio, which spreads less aggressively, requires about 80%. These thresholds are what governments use to set vaccination coverage targets, and falling below them, even slightly, can allow outbreaks to reignite in communities that were previously protected.

