It depends on the ingredients and quality of the detox pills being used, along with various other factors. For example, the size and weight of the person taking the detox pills, if their system is sufficiently hydrated to assist with the detox process, if they have ceased all drug use already, and so forth.
In summary, detox pills are a not a perfect cure-all. But what they are is proven to help speed up your body’s natural detox process by encouraging internal cleaning at a more aggressive level than is typical otherwise.
So yes, they can assist with removal of THC from the body, often very successfully. That is why we call them magic!