Well, based on my understanding, we don't know for sure.
What we do know, is that they give you a much higher chance of avoiding serious symptoms, including that most serious of symptoms, death. You won't be "virus-proof" completely, but someone vaccinated fully (so 2 doses for vaccines which require it), after a certain immunization period, which varies between 2-4 weeks after being fully vaccinated, will be super resilient to being in contact with Covid patients. Don't go get coughed on by 10 Covid patients, though.
Regarding contagion, apparently after vaccination, you can still get Covid with most vaccines, you just become "asymptomatic", i.e. it doesn't really affect you. However it seems that you're also much less contagious, which is still great, since it reduces the infection rate, it becomes much harder to spread it.
If you get Covid while immunity from vaccination hasn't kicked in fully... you can still be screwed. People have died 1 week after being vaccinated. So you probably want to stay put for a while until your immunity ramps up.
Regarding immunity, as I was saying, it's primarily lack of serious symptoms. I think they also make it harder for you to catch it, but I don't think we have super solid proof of this yet.
And for immunity, it's hard to say. We're basically just counting up days from initial vaccinations to see how long it lasts. For the other vaccines we know the time intervals because... time has passed. So far, for the current vaccines it seems that immunity is at least 6+ months. From what I've read we should be reasonably optimistic that we'll be immune for 1+ years. I don't think anyone expects lifetime immunity, yet.
TL;DR: Get vaccinated, it will keep you much safer, it will probably also help others around you, by making you spread it less if you do get it. You'll still get Covid but it will be much less of a deal. Side effects are temporary and not massive in the vast majority of cases.