A vaccine is a shot of inactive virus that stimulates your natural immune system. After you get the hepatitis B vaccine, your body will make antibodies that will protect you against the virus. These antibodies are stored in your body for several years and will fight off the hepatitis B virus if you are exposed to it.