According to the guidance of the Quran, there are two types of magic.
The type of magic given by the two Angels Harut and Marut by the permission of Allah Subhanah as a trial for the people, whereby the magic would cause differences between a husband and a wife in marriage.
The second type of the magic was an illusion performed by the magicians in the court of Pharoah, whereby their staff when thrown became a snake.
the first thing we, as believers, must understand that those who claim to do magic do not have the power to hurt or benefit anyone, without the permission of Allah Subhanah. No harm and no benefit can happen to the believer without the Will of Allah Subhanah. If Allah does not will it, all the magicians of the world can get together and try their magic on someone, they cannot harm him in the least!
All Power and All Strength is with Allah Subhanah Alone.
People who have had experience with such situations have related that the following are among the signs of a person who is possessed by jinn (or Satan):
Strong repulsion when hearing Qur’aan or Aathaan (call for prayers).
Episodes of losing consciousness and/or epileptic attacks, especially when Qur’aan is recited for the possessed person.
Frequent nightmares during sleep.
Tendency to avoid people accompanied by out-of-the-norm behavior.
The jinn who possesses him might speak when Qur’aan is recited for the possessed person.
Madness, as stated in the Qur’aan (interpretation of the meaning): “Those who devour usury will not stand except as stands one whom Satan by his touch hath driven to [epileptic] madness…”2:275
As for a person struck by magic he might experience the following:
Dislike of one’s spouse, as indicated in the Qur’aan by the following verse (interpretation of the meaning): “And from these (angels) people learn that by which they cause separation between a man and his wife…” (Al-Baqarah, 2:102).
Different attitude in the house from that which is outside the house. For example, a person will feel that he is missing his family when is outside the house but when he goes home, love changes quickly to extreme hatred.
Inability to have sexual intercourse with one’s spouse.
Frequent miscarriage for pregnant women.
Sudden change in behavior without obvious reason.
Complete loss of appetite for food.
Thinking or imagining one has done something when in reality one has not.
Sudden obedience and/or love for a particular person.
It should be noted that if a person experiences some of the above symptoms this does not necessarily mean that he is either possessed by a jinn or struck by black magic. It might be due to physiological or psychological reasons.
Allah Says in the Holy Quran Chapter 21 Surah Anbiyaa verse 35: Every soul shall have a taste of death: and We test you by evil and by good by way of trial: to Us must ye return
Allah Subhanah is the Creator of everything in existence, whether it be good or evil! And the wisdom behind the creation of evil is that Allah Wills to test mankind who amongst His slaves eschews evil and aligns himself with the good. If Allah Subhanah created only the good without the evil, then the test He Willed for mankind would be invalid, and the righteous obedient slaves of Allah Subhanah would not be differentiated from the disobedient.
The reason some people ‘try’ to perform magic is to fulfill their intention to harm someone in a ‘supernatural’ way.
Dear and Beloved Brother, we must realize that no amount of magic would take effect on someone without the precise Will and Permission of Allah Subhanah. Even if all the magicians of the world combined together and tried to harm someone, they would not be able to do so, if Allah Subhanah does not Will it; for All Power and Strength lies with none save Allah Subhanah, the Lord of the Worlds. Thus the believers must absolutely disregard their superstitions of magic (if any) and keep their full trust in the Power and Strength of their Merciful Lord.