Since David and Saul parted ways (with lots of javelins thrown at walls), the first book of Samuel has been bouncing back and forth between their stories with each chapter. It is as if there are two stories co-existing within the same timeline (Think the current marvel Avengers Movie Series). Saul though continues to spiral downward while David continues to raise his folk hero status.
Where last we left David, he was slaying evildoers by the order of the Philistine king Achish. He had gained great favor in Achish's mind. So much so that Achish figured the Israelites would hate him by now (the missing piece here is Achish not thinking of all the Philistines David had smote in the past though). The Philistines were going to go into battle again against the Israelites and David told Achish he would be at his side.
Meanwhile, in Saul's story line, he was watching the Philistines gather to battle against them. Despite his prayers, God would not answer him. becoming more and more worried, Saul disguises himself and turns to a witch to help him (even though he had cast all of the witches and wizards out of the land). The witch summoned Samuel from the dead, who then reminded Saul that God no longer had favor for him because he had disobeyed him by failing to finish off the Amalekites a while back. Samuel's ghost also reminds Saul that God has favor with David and informs him that Saul and Israel will fall to the Philistines.
Jumping back to David's timeline: The Philistine princes do not want David to go into battle with them because they fear he will team up with Saul against them. Perhaps this really was David's plan all along, but we will never know as Achish asks David to leave the Philistines and go home so that he doesn't get in trouble with the princes. David and his men go home to the wilderness of Ziklag only to find that those pesky Amalekites have swooped through and taken all of their families hostage. Only part of David's band of men are able to go with him in pursuit though as some have become too weak to carry on. Those that are strong enough go with David to smite the Amalekites (finishing Saul's job) and bring the women and children back. When they return there is turmoil among the troops as to who should get the spoils of battle (since many didn't even go into battle). David said, "Pish-Posh, everyone in the group gets a fair share of the spoils, even the elders of Judah," and divides up the riches of the evil doers as Robin Hood would have. The rest of the enemies of the people of the Lord were put on notice that day that David was the protector.
Back in Saul's timeline, the Philistines have killed his sons in battle and Saul has been wounded by an arrow. He asks his armor bearer to kill him so the Philistines won't. When his assistant won't kill him, he kills himself, which them prompts the armor bearer to do the same. The Philistines are victorious on the battlefield and celebrate by cutting off Saul's head and shipping his body parts around the kingdom. However, the valiant natives of the area decided this wasn't a fitting burial for a king. They went out in the night gathering his body and burned it, buried his bones and then fasted in honor of the king.
Stan Lee himself couldn't have written a better heroic and tragic story line...and imagine that, there's a sequel to come.