Vaccinations involve injecting small amounts of dead or inactive pathogens. These carry antigens, which cause your body to produce antibodies to attack them - even though the pathogen is harmless. E.g. the MMR vaccine contains weakened versions of the viruses that cause measles, mumps and rubella (german measles) all in one vaccine