Albendazole functions by inhibiting the polymerization of tubulin, which is essential for the formation of microtubules in the cells of the parasites. As a result, the drug disrupts the energy metabolism of the worms, leading to their immobilization and eventual death. This action is effective against a variety of nematodes and cestodes, making Albendazole a versatile choice for treating parasitic infections.