Hepatitis B is a liver infection caused by the hepatitis B virus. The virus that causes hepatitis B is spread through contact with infected blood or other body fluids of people who have hepatitis B. For example, you can get hepatitis B by having unprotected sex with an infected person. People who use intravenous drugs can get hepatitis B when they share needles with someone who has the virus. Health care workers, such as nurses, lab technicians and doctors, can get these infections if they are accidentally stuck with a needle that was used on an infected patient. Pregnant women can also pass it on to their babies. Hepatitis B cannot be transmitted through casual contact. For example, you cannot get hepatitis B by hugging or shaking hands with someone who is infected. check out.