So getting vaccinated

Stops you from getting covid and stops it from spreading it if you have it? I need to be educated on this...