The hepatitis B vaccine is a safe and effective shot that prevents hepatitis B, a liver infection that can lead to chronic liver disease and liver cancer. It is recommended for all infants, children, and adults who are at risk, and is typically given as a series of two or three doses. The most common side effect is soreness at the injection site.