Niclosamide 500 mg works by interfering with the energy production process of the parasites, leading to their paralysis and eventual death. It disrupts the parasites' ability to absorb nutrients, which weakens their hold on the intestines and allows the body to expel them.