Answer:
Vaccines help a body's immune system prepare in advance to fight infectious illnesses and potentially deadly diseases caused by infectious agents or their by-products. Essentially, vaccines give the body a preview of a bacterium, virus, or toxin allowing it to learn how to defend itself against that potential invader in advance. If the body is ever infected by that particular pathogen after the vaccine has done its work, the body's immune system is ready.

A high level overview of how they work:

In a vaccination you will receive a version of the pathogen (disease) that can not make you sick because it is inactive or significantly weakened. It will be introduced into your body with an injection or sometimes using oral or nasal formulations. Your immune system will then produce antibodies, which will kill or deactivate the introduced pathogen. Therefore, if an active/live pathogen would enter your body later, your immune system would be quickly able to produce more of the same type of antibodies, as it will recognize the organism that caused the infection and know what antibodies will work on it. Booster vaccinations then might be used over the years to essentially remind the immune system how to defend your body against the pathogen.

More detailed information:

The vaccine in a vaccination contains either a "dead" (inactive), or a weakened (attenuated) form of the potential invading microbe (viral or bacterial). These components of the vaccine are called the antigens that trigger a response from the immune system.

Our bodies use these antigens (weakened/dead virus or bacteria) as templates to create the perfect antigen-fighting antibodies for the specific pathogen. When the antibody is shaped just right to be able to match up with, and hook on to, that kind of antigen, it prevents us from getting sick even when the attacker is "alive" in the wild. The antibodies do this by holding on to each antigen and disabling its ability to attack and link up with our cells. Meanwhile, other immune system cells help in the fight and clean up the debris.

A healthy immune system remembers the pattern for every antibody that it has made (either as a result of vaccines, or those created from actually having had exposure to the pathogen in the wild). It can make these antibodies when it detects the same or similar microbes in the wild (normal strength) because of the "immunity" you have from the stored patterns. If these microbes enter the body in the future, the immune system can very quickly find the right pattern and start making the matching antibodies. That way, the immune system can quickly make those matching cells again to protect us from that same specific microbe (and sometimes strains that are very similar).

Additional information:

The dead microbes in vaccines can not make you sick if you are free of complicating serious disease or chronic illnesses. And, because the live attenuated microbes used in some of the vaccines have been treated to weaken them, they can not make you sick, either (except in rare cases with compromised immune systems or babies who have underdeveloped immune systems). Always check with your health care professional before getting vaccinations.

Many people are not aware that there are vaccinations to prevent bacterial infections as well as the more well known vaccinations to prevent viruses (e.g., flu, measles, etc.). According to the Centers for Disease Control and Prevention (CDC, see source in links below), there are currently vaccines for these specific bacterial infections:
"...there are vaccines against Hib, against some serogroups of N. meningitidis and many types of Streptococcus pneumoniae. The above vaccines are safe and highly effective."



Hib is a type of bacteria - Haemophilus influenzae type b (not a virus, even though the name of the bacteria sounds like a flu virus). It can be found to be the organism responsible for various common infections like bacterial pneumonia, cellulitis, etc.

There are also vaccines against more types of bacteria. One that can also cause pneumonia is called Streptococcus pneumoniae. Another bacteria, N. Meningitidis, causes some types of meningitis. The vaccines against bacteria work because of the same immunological process described above about viruses.

See the related links below for an excellent explanation and illustration of how vaccines work from the National Institutes of Health (NIH), as well as other sites.

See also the related question below about how flu shots work, which gives more details of how our immune systems help keep us well.

Vaccines help a body prepare in advance to fight illnesses and potentially deadly diseases. Essentially, vaccines give the body a preview of a bacterium, virus, or toxin, allowing it to learn how to defend itself in advance. If the body is ever invaded by that particular pathogen after the vaccine has done its work, the body's immune system is ready.

Note: There are comments associated with this question. See the discussion page to add to the conversation.
Contributor: Aggie80
First answer by Aggie80. Last edit by D4est. Contributor trust: 1251 [recommend contributor recommended]. Question popularity: 56 [recommend question].