All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The existence of magic is confirmed in the Book of Allah and the Sunnah of the Prophet . The existence of magic today is frequent in many parts of the world. Most of the activities of magicians are in remote countries that are far from the religion of Allah (Islam) and the belief in Him alone.
So these magicians act to affect the life of a person or affect his mind but that does not happen except by the Will of Allah.
Allah Says (interpretation of meaning): {…but they could not thus harm anyone except by Allah's Leave…..} [Quran 2:102].
Of course, magic is one of the evil and wrong things that Islam is fighting against. Indeed the struggle between truth and falsehood will remain in existence until the last day.
Allah knows best.