From a informational video I saw, the vaccine (Pfizer-BioNTech or Moderna) injects mRNA (see at bottom of comment), which tells your body to make certain proteins that attach to the virus's spike looking things. The virus's cell can no longer attach to a cell with its spike things, because the protein is stuck on to them. The t cells (immune system) can then destroy the COVID cells. The mRNA travels to the nearest lymph node, which can replicate the protein that stops COVID from attaching. This is an effective method. Flu shot-like vaccines are still in development.
https://www.cdc.gov/coronavirus/2019-ncov/vaccines/different-vaccines/how-they-work.html
mRNA is messenger RNA. DNA is replicated onto a single strand of mRNA. That is called transcription. The mRNA travels into the cell's cytoplasm and starts to go through a ribosome that is near. At the same time, tRNA is being proteins based on pairs of 3 bases (basics of dna that takes time to explain) called codons. The correct amino acids are matched by the tRNA, and the strand of acids is now a protein strand. This happens in the matter of a few seconds.
I hope this wasn't too long to read, and I hope that this helps!