What's protection after getting first dose of vaccine?

What's the protection after getting just the first dose of vaccine and how long does it take to build any immunity? What about after the second shot?