The word magic = ‘Sihr’ is mentioned in the Quran in both surah 20 verse 71 and surah 37 verse 15.
Surah 20 Verse 71
Surah 37 Verse 15
The word magician = ‘Sahir’ is mentioned in the Quran in both surah 7 verse 109 and surah 26 verse 34.
Surah 7 Verse 109
Surah 26 Verse 34
In several verses in the Quran, these words are used in relation to the stories of Moses and Pharaoh's magicians.
These words apply to magic as such rather than witchcraft. When we inquire about witchcraft and sorcery, we find these referred to in the following Quranic verses:
Surah 2 Verse 102
Literal (Word by Word)
And they followed what recite(d) the devils over (the) kingdom (of) Sulaiman. And not disbelieved Sulaiman [and] but the devils disbelieved, they teach the people [the] magic and what was sent down to the two angels in Babylon, Harut and Marut. And not they both teach anyone unless they [both] say, "Only we (are) a trial, so (do) not disbelieve." But they learn from those what [they] causes separation with it between the man and his spouse. And not they (could) at all [be those who] harm with it, anyone, except by permission (of) Allah. And they learn what harms them and not profits them. And indeed, they knew that whoever buys it, not for him in the Hereafter any share. And surely evil (is) what they sold with it themselves if they were (to) know.
Also in Surah 113 Verse 4
Literal (Word by Word)
And from (the) evil (of) the blowers in the knots,
The above verses confirm several prime issues and from analysing surah 2 verse 102 we understand that:
Witchcraft and sorcery are condemned by God.
Those who practice witchcraft/sorcery cannot harm people against the will of God.
We also understand from surah 113, the opening word is “Say”.
This tells us that we should utter the words in this surah to seek God's protection from all evil. We seek God's protection against all evil among what He created (113:2), against witchcraft (113:4), and against the harmful power of envy (113:5).
Please verify everything you have read.
Peace and Respect!
References
1- Quranwbw.com
2- www.quran-islam.com
Sihr also means to captivate. Or one whom is captivated by something. Goes on..