The one who wants witchcraft performed goes to the magician and asks him to perform witchcraft on someone. Or he may think that this person is not a witch, so he asks him to treat him or one of his relatives for some sickness.
At this point the magician asks him for the name of the person on whom he wants him to perform witchcraft, and the name of his mother, and for something that belongs to him, such as some hair, nails, clothing or his picture.
But why does the magician ask about the mother's name, and not the father's name as he should? That is because the witch, and the jinn who are with him, are disbelievers who reject all religions and heavenly laws, and mock them. So they do not acknowledge the lawful marriage contract.
In the view of the magician, everyone who comes to him is illegitimate and born of adultery. After that, the witch counts the number of letters in both names. If he thinks that this name is closer to mud (Al-teen), he buries the charm in the ground; if he thinks it is closer to water (Al-mar), he puts it in water, such as in a well—as the Jew Labeed ibn Al-A'sam did when he bewitched the Messenger of Allah (PBUH). When he counted the letters in the name of the Prophet (PBUH), he found that in the name Muhammad and in the name of his mother Aminah, the letters Meem and Alif were repeated, and that is closer to water (Al-mar), so he put the charm in the well of Dharwaan.
The effect of witchcraft on the victim will occur in one of two ways: either it will have an internal effect inside the body of the victim, or it will have an external effect, such as if the body is affected from without or from a distance, in which case it can cause anxiety and hallucinations. This is how the witch performs his craft.
The Islamic way of dealing with witchcraft is the best of all ways, because sending the victim to a witch to relieve him of the spell may lead to fighting between two groups of jinn, in which case the fate of the victim will depend on the outcome of the battle; the two groups of jinn may even agree between themselves to expel the servant jinn for a while, after which he will come back and carry on with his work. But in contrast, treatment using the Noble Qur'an cannot be resisted either by the witch or the jinn.
Had We sent down this Qur'an on a mountain, you would surely have seen it humbling itself and rent asunder by the fear of Allah. Al-Qur’an, 59:21