613 Mitzvot
Negative Mitzvah 34
Not to perform acts of magic

Devarim (Deuteronomy) 18:10
Lo-yimatse vecha, ma'avir beno-uvito ba'esh, kosem ksamim, me'onen umenachesh umchashef
There should not be found among you, who makes his son or daughter pass through the fire, or divine divinations, or observes times, or observes signs and omens or practices witchcraft

We should not perform any type of witchcraft or sorcery. The hebrew word is kasaf. It means the casting of spells.

Devarim (Deuteronomy) 18:9-14
When you are come into the land which YHVH your Elohim gives you, you shall not learn to do after the abominations of those nations.There shall not be found with you anyone who makes his son or his daughter to pass through the fire, one who uses divination, one who practices sorcery, or an enchanter, or a sorcerer,or a charmer, or a consulter with a familiar spirit, or a wizard, or a necromancer.For whoever does these things is an abomination to YHVH: and because of these abominations YHVH your Elohim does drive them out from before you. You shall be perfect with YHVH your Elohim. For these nations, that you shall dispossess, listen to those who practice sorcery, and to diviners; but as for you, YHVH your Elohim has not allowed you so to do.

All these idolatrous practices fit under the category of sorcery. They were actions that the nations were involved with, but YHVH does not allow us, His people to be involved in them, because He wants us to be perfect.

Now the works of the flesh are obvious, which are: adultery, sexual immorality, uncleanness, lustfulness, idolatry, sorcery, hatred, strife, jealousies, outbursts of anger, rivalries, divisions, heresies, envyings, murders, drunkenness, orgies, and things like these; of which I forewarn you, even as I also forewarned you, that those who practice such things will not inherit the Kingdom of God. (Galatians 5:19-21)

Both Galations and the Septuaguint uses pharmakon. We get the word pharmacy from this word. Often sorcery involves the use of drugs or potions to induce spells.

1 (Shemu'el) Samuel 15:23
For rebellion is as the sin of witchcraft, and stubbornness is as idolatry and terafim. Because you have rejected the word of YHVH, he has also rejected you from being king.

But we see that it goes much deeper than just the use of spells or divination. Rebellion and stubbornness and rejection of the word of YHVH is the same thing as sorcery. We have rejected YHVH as the ruler of our lives. Because when we reject Him and His word, we turn to other sources for direction.