There is a difference between the magicians spoken of in the Bible and the magicians and illusionists one sees today at parties and in stage show acts. The magicians in the Bible either gained their power from demonic forces or else they were little more than charlatans who pretended to have great knowledge or to discover secrets, tell fortunes, and predict things to come.
The word "magic" is actually used six times in the Bible, three times in the Old Testament and three times in the New Testament. However, the word, "magician(s)" is used 15 times. We know that the Egyptians worshiped many gods and that magic played an important part in the rituals of their high priests. It was through the deception of magic that the Egyptians were made to believe their gods actually had power. Genesis speaks of magicians in pharaoh’s service. But it is interesting to note that they were powerless to interpret pharaoh’s dream (Genesis 41:8), prompting pharaoh to send for Joseph, who interpreted it correctly because he spoke the words God gave him.
The book of Exodus speaks of magicians practicing what is called "secret arts" (Exodus 8:7), as they brought up frogs and thereby replicating God’s plague on the land of Egypt. Magic in this case was used in an attempt to mock God by mimicking the miracles God performed through Moses. Magic and sorcery played a major role in the pantheistic religion of Egypt. Its ancient documents record the magicians’ activities, one of the most prominent being the charming of serpents. These men were also self-styled “wise men” and “sorcerers”—the learned men of the day and the religious as well. Two of these men, named Jannes and Jambres, are mentioned in 2 Timothy 3:8. Any supernatural power they may have had came from Satan (2 Corinthians 11:13-15). If not supernaturally inspired, they simply practiced their trade by optical illusion, sleight of hand, or the learned physical manipulation of things such as snakes. Whatever the case, deceit was their aim, and they were sufficiently skillful to completely fool pharaoh and his servants.
In regard to the magicians and illusionists we see today, if they are nothing more than entertainers, there is probably nothing wrong with being entertained by them. If, however, they are involved with the occult, clearly this is something Christians must avoid. The difficulty is in knowing which are associated with the occult and which are not. In any case, wisdom and discernment are needed whenever dealing with any form of magic or illusion.