Toxoid vaccines work by stimulating the immune system to produce antibodies against the toxin produced by the bacteria. When vaccinated, the immune system recognizes the toxoid as foreign and mounts an immune response by producing antibodies. These antibodies remain in the body, providing immunity. If the person is later exposed to the actual toxin, the immune system can quickly recognize and neutralize it.