Vaccines are a critical component of pharmacological treatments in epidemiology. They work by stimulating the immune system to provide immunity against specific diseases, thereby preventing infection. Vaccination programs have led to the eradication of diseases such as smallpox and have significantly reduced the incidence of other infectious diseases like polio and measles. Herd immunity, achieved through widespread vaccination, protects those who are unvaccinated or have weaker immune systems, further controlling disease spread.