Hepatitis B is caused by the hepatitis B virus (HBV) and is transmitted through contact with infected blood, semen, or other body fluids. Common ways to get hepatitis B include sexual contact without a condom, sharing needles or syringes (such as for drug use or tattoos), accidental needlestick injuries, and from an infected mother to her baby during childbirth. It does not spread through casual contact like sneezing, coughing, or touching objects such as doorknobs. Vaccination is effective in preventing hepatitis B infection.