How vaccines give immunity to disease
Vaccine given containing the antigen, this causes specific B cells to be activated for the first time. The first clone of B memory cells are produced. 
A booster is given later with more of the same antigen. The specific B cells are activated again, dividing to form more memory cells.