How Vaccines Prevent Diseases
The diseases that vaccines prevent can be dangerous, or even deadly. Vaccines reduce the risk of infection by working with the body's natural defenses to help it safely develop immunity to disease.
When germs, such as bacteria or viruses, invade the body, they attack and multiply. This invasion is called an infection, and the infection is what causes illness. The immune system then has to fight the infection. Once it fights off the infection, the body is left with a supply of cells that help recognize and fight that disease in the future.
Vaccines help develop immunity by imitating an infection, but this "imitation" infection does not cause illness. It does, however, cause the immune system to develop the same response as it does to a real infection so the body can recognize and fight the vaccine-preventable disease in the future. Sometimes, after getting a vaccine, the imitation infection can cause minor symptoms, such as fever. Such minor symptoms are normal and should be expected as the body builds immunity.
Read more about how vaccines work in the Parents Guide to Childhood Immunizations [1.84 MB, 6 pages].
http://www.cdc.gov/vaccines/parents/vaccine-decision/prevent-diseases.html