Hepatitis A and B are serious liver infections caused by the Hepatitis viruses. Hepatitis viruses are highly contagious, either through person-to-person contact or consumption of contaminated food or water. The best way to prevent Hepatitis A or B is by getting vaccinated. Vaccination gives lifelong protection from Hepatitis A and long-term protection (possibly lifelong) from Hepatitis B.
(From: Centers for Disease Control and Prevention – Hepatitis)