Vaccines expose us to pieces of either a bacteria or a virus, which causes our bodies to recognize a potential threat and to mount an immune response. The goal with a vaccine is to help the body prepare for an actual infection, so it is ready to rapidly and effectively eliminate the SARS-CoV-2 virus when exposed to it.
There are different types of vaccines. The Pfizer and Moderna vaccines are called messenger RNA (mRNA) vaccines. The mRNA in the vaccines carry genetic instructions which cells in the body use to make copies of viral proteins. Once your cells make those proteins, your immune system will make the antibodies that bind to the protein, disable the virus, and protect you from getting sick or as sick from this virus.