Edward Jenner visited the milkmaids to see if it was true that milkmaids were much less likely to catch smallpox, although they caught a much milder disease: smallpox. He came up with the theory that if you caught cowpox, you would never catch smallpox.
Jenner decided to test his theory. His gardener's son, James Phipps, was the first person he tried it on.
Jenner took the pus of a cowpox sore on a milkmaid, and injected it into James, and waited to see what would happen.
James was ill for a short period of time with the disease given to him by Jenner: cowpox.
When James was better and no longer had cowpox, Jenner gave him a dose of smallpox.
Nothing happened! James didn't catch cowpox, and never did. Jenner tested his theory on a further 22 people, and eventually the government accepted this way of preventing smallpox, and the death rate went right down.