Vaccines work by training the immune system to recognise and fight harmful germs such as viruses or bacteria. A vaccine usually contains a weakened, inactive or harmless part of a germ. When it enters the body, the immune system identifies it as a threat and begins producing antibodies. These antibodies remain in the body as immune memory. Later, if the real germ tries to infect the person, the immune system responds much faster and prevents serious illness.
This process is called immunization. Vaccines do not cause the actual disease because the virus or bacteria inside them cannot multiply enough to cause harm. Instead, they prepare the body to defend itself.