The principle of vaccination is to induce a “primed” state in the vaccinated subject so that, following the exposure to a pathogen the body elicits a rapid secondary immune response which leads to accelerated elimination of the organism and protects the body from disease and infection by that particular pathogen.
The main purpose of vaccination is to generate memory T and B cells in the vaccinated individual.