Explanation
‘Ā'ishah (may Allah be pleased with her) said that Labīd ibn al-A‘sam, a Jew from the tribe of Banu Zurayq, cast a spell on the Prophet (may Allah's peace and blessings be upon him) and he imagined that he had done something that he had not. One day, the Messenger of Allah (may Allah’s peace and blessings be upon him) was in ‘Ā'ishah's house, but he was paying her no attention as he was totally engrossed in supplicating repeatedly to Allah, the Almighty, to reveal to him the reality behind this issue.
Then, the Prophet (may Allah's peace and blessings be upon him) told her that Allah, the Almighty, had answered his supplication and sent two angels to him; one of them sat by his head and the other by his feet. One of them said to the other: “What is wrong with this man?” referring to the Prophet (may Allah’s peace and blessings be upon him). The other said: “He is under a magic spell.” He asked: “Who has bewitched him?” The other said: “Labīd ibn al-A’sam.” He asked: “With what?” meaning: what was used to create this magic spell? The other said: “With a comb and the hair stuck in it, and the skin of a male date palm pollen.” He asked: “Where is it?” The other said: “In the well of Dharwān.” This was a well-known well in Madīnah. The Messenger of Allah (may Allah’s peace and blessings be upon him) went there with some of his Companions and took it out. Then the Prophet (may Allah's peace and blessings be upon him) came back and told ‘Ā'ishah that the water of the well was red like a Henna leaf infusion (either because the water of that well itself was bad or due to what had been thrown into it), and the date palms were as hideous and ugly as the heads of devils.
‘Ā'ishah (may Allah be pleased with her) asked: "Should you take it out?" meaning: should you take those things out of the pollen skin and show them to the people so they know what had happened? The Messenger of Allah (may Allah’s peace and blessings be upon him) said: "No. Allah has healed me and I was afraid that I would spread evil among the people," meaning: Allah has healed me, and I feared that spreading this among the people might bring evil upon them, as it would attract the hypocrites’ attention to the harm that magic can cause, and may encourage them to learn it to harm the believers. Therefore, the Messenger of Allah (may Allah’s peace and blessings be upon him) gave up this benefit due to fear of its evil consequences. So the Prophet (may Allah's peace and blessings be upon him) ordered that the well should be filled with earth, and it was.
Some people have denied the story of magic being done to the Prophet (may Allah's peace and blessings be upon him) claiming that it casts doubt upon his infallibility. They argued that, accepting the story means that the Prophet (may Allah's peace and blessings be upon him) might have imagined that he was seeing Jibrīl when he was not there, and that something had been revealed to him when nothing had been revealed.
However, all of this is to be rejected, because the evidence that the Prophet (may Allah's peace and blessings be upon him) was infallible in what he conveyed from Allah, the Almighty, and that he was infallible in his manner of conveying it is well established. The harm that afflicted him due to the magic did not include any deficiency regarding conveying the Message. Rather, it was the sort of illness and troubles that normally afflict human beings. The effect of the magic that was performed on the Messenger of Allah (may Allah’s peace and blessings be upon him) was explained in other narration, which stated that he (may Allah’s peace and blessings be upon him) imagined that he had had sexual intercourse with his wives, when he had not done so.