In 1796, the scientist Edward Jenner injected material from a cowpox virus into an eight-year-old boy with a hunch that this would provide the protection needed to save people from deadly outbreaks of the related smallpox virus.
It was a success.
The eight-year-old was inoculated against the disease, and this became the first ever vaccine.
But why did it work?
To understand how vaccines function, we need to know how the immune system defends us against contagious diseases in the first place.
When foreign microbes invade us, the immune system triggers a series of responses in an attempt to identify and remove them from our bodies.
The signs that this immune response is working are the coughing, sneezing, inflammation and fever we experience, which work to trap, deter and rid the body of threatening things, like bacteria.
These innate immune responses also trigger our second line of defense, called adaptive immunity.
Special cells called B cells and T cells are recruited to fight microbes, and also record information about them, creating a memory of what the invaders look like and how best to fight them.
This know-how becomes handy if the same pathogen invades the body again.
But despite this smart response, there's still a risk involved.
The body takes time to learn how to respond to pathogens and to build up these defenses.
And even then, if a body is too weak or young to fight back when it's invaded, it might face very serious risk if the pathogen is particularly severe.
But what if we could prepare the body's immune response, readying it before someone even got ill?
This is where vaccines come in.
Using the same principles that the body uses to defend itself, scientists use vaccines to trigger the body's adaptive immune system without exposing humans to the full strength disease.
This has resulted in many vaccines, which each work uniquely, separated into many different types.
First, we have live attenuated vaccines.
These are made of the pathogen itself but a much weaker and tamer version.
Next, we have inactive vaccines, in which the pathogens have been killed.
The weakening and inactivation in both types of vaccine ensures that pathogens don't develop into the full-blown disease.
But just like a disease, they trigger an immune response, teaching the body to recognize an attack by making a profile of pathogens in preparation.
The downside is that live attenuated vaccines can be difficult to make, and because they're live and quite powerful, people with weaker immune systems can't have them, while inactive vaccines don't create long-lasting immunity.
Another type, the subunit vaccine, is only made from one part of the pathogen, called an antigen, the ingredient that actually triggers the immune response.
By even further isolating specific components of antigens, like proteins or polysaccharides, these vaccines can prompt specific responses.
Scientists are now building a whole new range of vaccines called DNA vaccines.
For this variety, they isolate the very genes that make the specific antigens the body needs to trigger its immune response to specific pathogens.
When injected into the human body, those genes instruct cells in the body to make the antigens.
This causes a stronger immune response, and prepares the body for any future threats, and because the vaccine only includes specific genetic material, it doesn't contain any other ingredients from the rest of the pathogen that could develop into the disease and harm the patient.
If these vaccines become a success, we might be able to build more effective treatments for invasive pathogens in years to come.
Just like Edward Jenner's amazing discovery spurred on modern medicine all those decades ago, continuing the development of vaccines might even allow us to treat diseases like HIV, malaria, or Ebola, one day.