Vaccines teach the immune system by mimicking a natural infection. For example, the yellow fever vaccine, first widely used in 1938, contains a weakened form of the virus that doesn’t cause disease or reproduce very well. Human macrophages can’t tell that the vaccine viruses are weakened, so they engulf the viruses as if they were dangerous. In the lymph nodes, the macrophages present yellow fever antigen to T cells and B cells.
A response from yellow-fever-specific T cells is activated. B cells secrete yellow fever antibodies. The weakened viruses in the vaccine are quicky eliminated. The mock infection is cleared, and humans are left with a supply of memory T and B cells for future protection against yellow fever.