Please read the Immune System page if you have not already.
As you can see, exposure to the pathogen is what allows your body to develop an arsenal against it. However, this usually comes at the price of at least being sick for a few days in the case of the flu, and in severe cases the virus can wreak havoc on your body before your adaptive immunity has time to recognize it. For example, poliomyelitis, or Polio, infects the brain and spinal cord which can result in paralysis along with other neurologic disorders.
A vaccine is essentially a concoction of parts of the virus that your body would recognize, but not a fully functional virion. This allows your body to recognize these epitopes, build up an arsenal, so it can immediately eradicate harmful infections once they enter the body. It does so without putting you at any risk of being symptomatic of the pathogen induced syndrome.
Questions and Controversies:
Can too many vaccines given at once overload your immune system and cause problems?
No, each B and Cytotoxic T cell system are completely independent as you have many Helper B Cells, it only serves to convenience the patient and doctor by preventing the waste of time.
Do Vaccines contain harmful/neurotoxic metals?
Just like the food you eat, the water you drink, and the air you breath, vaccines contain things that can be toxic at high levels (as all things are). But, based on massive amounts of research, the levels of the ingredients of vaccines are nowhere near levels at which they become toxic.
Do my vaccines contain chemicals from aborted fetuses?
Many cell lines that are used for a wide array of research and drug development were created using human embryonic stem cells (hESCs), which usually do not come from aborted fetuses and the primary modern source of them are left over stem cells from in vitro fertilization. However some cell lines used to produce vaccines are derived from hESCs from aborted fetuses. This does not require the maintenance of the practice of abortion because once the cell line is obtained, it can be kept forever. Not receiving a vaccine for this reason could result in bringing back diseases that could cause death and suffering in massive proportions.
Why should other people care if I get a vaccine?
Vaccines do not work because they are 100% effective, they work by eradicating a disease from a population by immunizing enough people that, if by chance a person who had the vaccine did not become immune, that person would likely not be able to spread it. This would cause the population viron levels to dwindle to non threatening levels. If not enough people in a community are vaccinated, it renders them essentially useless, even for many people who are vaccinated.