How does the COVID-19 vaccine protect against the virus?

How does the COVID-19 vaccine protect against the virus?