The vaccine works by triggering patients' immune systems to produce antibodies that bind to cocaine molecules in the bloodstream, making them too large to pass into the brain's mesolimbic system, or "reward centre," where the drug normally stimulates high levels of pleasure-inducing dopamine.
This is an interesting approach to addiction treatment. The vaccine essentially makes the person "immune" to the effects of cocaine. I would assume this is to help prevent relapses, but I wonder if it would result in addicts resorting to other substances.