A vaccine is a preparation that provokes a primary adaptive response, and hence memory, against a pathogen without causing its disease: the pathogen weakened (measles, tuberculosis), killed (polio by injection), reduced to one of its proteins or an inactivated toxin (tetanus, hepatitis B), or, most recently, to the instructions for the cell to make that protein. An adjuvant added to the preparation provokes the small inflammation without which the dendritic cells would not carry the antigen to the lymph node. Booster doses turn the primary response into a secondary one and extend the memory for decades.
Examples
Example 34.6 (A virus, met twice)
First influenza: the virus multiplies for three days before the adaptive response is ready; by day 7 cytotoxic T cells are killing infected cells in the airways and antibodies are neutralising free virus; by day 10 the person is recovering, with memory cells of both kinds. The same strain a year later: antibodies already in the blood block most of the virus at entry, memory cells expand within two days, and the infection is over before it is noticed. A different strain whose surface proteins have mutated escapes the antibodies — which is why the vaccine is remade every year.