Bottom line is King Saul was looking for help from the witch of Endor, to contact someone in the grave, a dead Samuel, so that he could know from God how he could gain a victory over the Philistines.
But God was not talking to Saul any more.
By knowing what the Bible teaches about the state of the dead, and the circumstances regarding Saul's relationship with God at the time, we can be quite certain that it was not actually Samuel raised from the dead speaking to him, but a fallen angel, a demonic spirit.
That Saul even attempted this séance with a spirit medium (witch) was an abomination, a further rebellion against God, and Saul paid for his rebellion with his life.
1 Chr 10:13 So Saul died for his transgression which he committed against the LORD, even against the word of the LORD, which he kept not, and also for asking
(counsel) of
(one that had) a familiar spirit, to inquire
(of it);
1 Chr 10:14 And inquired not of the LORD: therefore he slew him, and turned the kingdom unto David the son of Jesse.
The words in paranthesis in verse 13 are supplied by the translator, as they are not in the original text.
So if you drop those words, it reads:
So Saul died for his transgression which he committed against the LORD, even against the word of the LORD, which he kept not, and also for asking of a familiar spirit, to inquire;
So the passage above clearly states, Saul communicated with a demonic spirit, not Samuel.
Peace and love