Throughout the Bible there is frequent condemnation of witchcraft -- usually referring to divination or calling up the souls of the dead -- as it is an activity that opposes God and may include the worship of demonic spirits.
In the Old Testament, King Saul falls into despair after seeing the strength of the Philistine army and feels helpless. He wants God to speak to him, but God is silent.
Not satisfied with God's silence, he takes matters into his own hands and summons the Witch of Endor.
Saul instructs the witch to "Conjure up Samuel for me," as the prophet Samuel had recently died.
God allows this to happen, but it does not bode well for Saul. Samuel proclaims that, "the Lord will deliver Israel, and you as well, into the hands of the Philistines. By tomorrow you and your sons will be with me, and the Lord will have delivered the army of Israel into the hands of the Philistines" (1 Samuel 28:19).
Later Saul's consultation of the witch would be recalled as part of the events that led to his death.
The Church has always condemned witchcraft, as it involves a distrust in God, seeking guidance or power from demonic powers, instead of trusting in the providence of God.