Answer and Explanation:
The person who answered before me is correct.
Vaccines train your immune system to recognize certain bad bacteriums, viruses, and other micro-organisms that can cause disease so they can (at least attempt to) fight it off.
When doctors inject these antigens into us, (which is something that induces an immune response in the body by producing antibodies) our immune systems can learn how to recognize these foreign, hostile invaders and fight them off.
Plus, if we get a certain disease again, these antigens will remember and most likely fight it off better than before.
~hope i helped and have a nice day.~