When our bodies become sick with a virus, bacteria, fungi, parasite, etc., our adaptive immune system, the one that “remembers” microbes, not only fights off the microbe but creates protective immunity against it.
Protective immunity is the body’s ability to resist a certain disease. The body’s source of protective immunity against microbes comes from the antibodies created by B cells, as well as the memories stored in the body’s specialized lymphocytes (B and T cells). By “specialized”, I mean they hold a special memory of the particular microbe the protective immunity is against.