When a person is vaccinated, a small amount of dead or inactive pathogen (that they are being vaccinated against) is introduced into their body. This stimulates the white blood cells to produce antibodies.This means that if the pathogen re-enters the body at a later date, the white blood cells can respond rapidly to produce the same antibodies, which will prevent infection.