It is communicated through many types of bodily fluid. I remember getting threes shots for B, the second shot after a month and another six months later.
I vaguely remember there is also a type C. Must be rare and wonder if there is a vaccine for that also.