Vaccines introduce a harmless form of a pathogen (or its genetic material) into the body, prompting the immune system to produce antibodies without causing illness. This process trains the immune system to recognize and fight the real pathogen if encountered, reducing the likelihood of severe infection and aiding in disease eradication.