Your body will fight the virus that you are being vaccinated for because they put the virus in the vaccine so when you come in contact with it you will not get sick. For example the flu shot contains the flu virus so your body attacks it and when you come in contact with it later your body knows to fight it of and you will not get sick