The one of prevention against Hepatitis B is vaccine. People who are in the risk group to be infected by the virus should to visit GP. Another 'day to day' prevention against Hepatitis B is to using condoms during every sexual activity. It's also essential to protect yourself from other also dangerous STI's. If you are an injection drug user it's very important to use needle only once.
Please do not share your toilet equipment like toothbrush, razor nail clips with anyone. Virus can live outside of the body for 7 days.