The hepatitis B vaccine stimulates the immune system to produce antibodies against HBV. It uses a recombinant DNA technology to produce a non-infectious component of the virus, known as the hepatitis B surface antigen (HBsAg). When injected, the immune system recognizes HBsAg as foreign and produces antibodies to fight it.