Virus enters body, hopefully survives immune system long enough to insert instructions into your cells, your cells churn out tons of copies of coronavirus spike protein, your immune system sees the surfeit of spike protein and develops a response (antibodies and T* cells).
https://blogs.sciencemag.org/pipeline/archives/2020/04/23/a-...