Sanjay Gupta explained it on CNN: They direct the body, via the DNA, to make the protein that is on the spikes of the covid virus, which in turn causes a reaction that results in the production of antibodies that come out to fight, and can defeat the real virus if the person becomes infected.
So, it is a headfake, that results in antibody production against covid.
The question is what if besides the protein the body starts producing other stuff, and you go ....nuts?