Samuel anoints David. Image from Wikipedia
Chapter 16 is an interesting chapter. It's about how Yahweh (God) chooses a new king, largely because the previous king (Saul) did not kill everyone and everything as he was commanded. This chapter has some contradictions and just overall foolishness.
It starts with God asking Samuel how long he's going to mourn over the loss of Saul as king, because God has someone else in mind and would like to get moving on this new project. God's idea is to get one of "Jesse's" sons. I'm not sure who Jesse is. The author of this chapter must be one of those people who brings up people's names in conversations whom the listener doesn't know but is expected to know.
Samuel is worried because if he tells Saul that he is no longer king, then Saul might just kill Samuel. So, God comes up with a clever plan. First, the "spirit" of God left Saul, and God instead replaces this spirit with an "evil spirit." The spirit of God had went into David after Samuel anointed him a little earlier in the chapter.
Later, Saul (who apparently hasn't been told yet that he's no longer king) is sitting around his court with an evil spirit inside him, and decides that he wants a musician. He hears that Jesse's son David is a great harp player, and that God is with him too. Oh, the irony! He doesn't realize that the God is LITERALLY with David!
So, David shows up and plays harp for Saul. While David is playing the "evil spirit from God" LEAVES Saul because of David's astounding harp playing. Saul absolutely loves David, and becomes an instant fan.
The chapter ends here, but the contradiction is that here we see that Saul knows who David is. But, in the next chapter, Saul completely forgets who David is! It's things like this why scholars over the years think that each book of the Bible may have multiple authors, who were using other texts that said slightly different things. In this case, it's like watching Metallica play and then falling in love with their music, but shortly afterward completely forgetting who they are.