How does a vaccine work?

Ait kills viruses.
Bit protects cells from viral infection.
Cit prepares the immune system to recognize viruses.
Dit prevents viruses from being transmitted from an infected person.