It is a glycoprotein located on the surface of viruses. In the case of SARS-CoV2, the virus had a particularly promiscuous type of spike protein that allowed it to be easily transmitted hence its virulence. Most of the mRNA tech used in making the mRNA vaccines would only introduce the RNA sequence that codes for the spike protein and not the entire virus into the body. Dendritic cells would then pick up the RNA sequence, transcribe the protein for which it encodes, in this case the spike protein, and present this spike protein to the rest of the immune system, Anti bodies would be formed against the spike protein and the body would safely acquire immunity against the virus.
The spike proteins are a common feature of a lot of viruses! Its not a man made item.