This is a procedure used to strengthen the body’s ability to fight certain diseases using the immune system. A weakened or inactive dose of a microorganism is injected into the body to allow the immune system to build up a response.
When the person is exposed to the same organism again they already have some protection against it and don’t develop the disease.