The account of the witch of Endor summoning Samuel is recorded in 1 Samuel 28:7-20, and it is the only biblical account of someone being visited in such a manner by someone who was deceased. Saul, having deprived himself of every legitimate means of spiritual input as a result of his own disobedience and rebellion, walked in foolishness again by seeking out the very resource (a medium) he had previously removed from the land. By divine law, mediums and spiritists were banned from Israel (Deuteronomy 18:11), and Israel was not to be defiled by them (Leviticus 19:31). That the king would stoop to this indicates how far he had fallen from God’s grace.
The passage does not give us any reason to believe it was anyone other than Samuel, who is described by the medium as “an old man wearing a robe” (v. 14). Obviously, age and clothing do not exist in the realm of the spirits of those who have died, but God miraculously gave Samuel such appearances as would enable Saul perceive who the spirit was. The message Samuel gave Saul was completely accurate. God allowed the witch of Endor to summon the prophet Samuel in order to give King Saul the news of his coming defeat and death.
This does not mean that it is genuinely possible for witches or mediums to speak with the dead, only that God allowed it in this one exception. When a person dies, his soul is taken to heaven or hell, depending on whether he has placed his faith in Christ (Matthew 25:46). There is no reason to believe that a deceased person has any ability to leave heaven or hell in order to visit his living family members. Any such claim is a demonic deception (2 Corinthians 11:14-15). God declared such practices to be abhorrent to Him, and those who did practice such things in Israel were to be put to death (Leviticus 20:27; Deuteronomy 18:10-12). Satan would like nothing more than for people to dabble in the occult world of spiritism and necromancy. God’s commandments regarding these things are designed to protect us from the schemes of our enemy, the devil, who “prowls around like a roaring lion looking for someone to devour” (1 Peter 5:8).