Active immunity is the type of immunity developed when a person’s own immune system produces antibodies and memory cells in response to an infection or vaccination. It provides long-term protection because the immune system “remembers” the pathogen and can respond quickly if exposed again.