Edward Jenner created the first vaccine in the 1770s. At this time, smallpox was a deadly disease. Jenner noticed that people who had already had cowpox (a disease that is related to smallpox) usually did not get smallpox. He thought that getting cowpox protected people against smallpox.
To test this idea, Jenner gave a boy cowpox. Then he infected the boy with smallpox. The boy did not get sick because he had already had cowpox. Jenner was right: having cowpox protected people against smallpox.
Because cowpox inoculation made fewer people sick than smallpox inoculation, England made smallpox inoculation illegal in 1840. In 1853, they made another law that said every child had to be vaccinated against smallpox using Jenifer vaccine.
In the 19th century, Louis Pasteur made a rabies vaccine.
In the 20th century, scientists created vaccines to protect people against diphtheria, measles, mumps, and rubella. In the 1950s, Jonas Salk created the polio vaccine.
However, vaccines still do not exist for many important diseases, like malaria and HIV.
Many countries have passed compulsory vaccination laws - laws that require certain people to get vaccinated. For example, in many countries, children have to be vaccinated against certain diseases in order to go to public school.