So here in chapter 17, we come to the infamous story of the giant Goliath. The Philistines and the Israelites are camped on opposite sides of the valley of Elah, and out comes Goliath, a man about ten feet tall. Now I've mentioned it before, but this is the most appropriate place to bring it up, so I'll repeat myself: while ten feet seems unlikely, it's not completely outside of the realm of possibility. There are men living in the present day whose height is in the neighborhood of nine feet, so personally, I find this comparable.
Something interesting about giantism that I heard about on a television special on the matter is that there is a form of giantism that is caused by a specific sort of brain tumor. This tumor causes three symptoms that are suggestive of this story. First, and most obvious, is that people with this tumor grow to great height with the only apparent limit being what their health can otherwise support (thus Goliath's height). Secondly, it causes problems with the vision centers of the brain, severely limiting peripheral vision (thus David may have come to an advantage over Goliath by moving in closer). Thirdly, it makes the brain more susceptible to serious trauma from a sharp blow, making someone likely to die if they were, oh, say hit by a rock in the forehead (thus Goliath's manner of death). Not all miracles are supernatural: consider the fact that I know all of the above, but David certainly did not.
Goliath challenges the Israelites to one-on-one combat. This may have been with the intention of simplifying the battle, but more likely, it was with the intention of breaking the spirit of the Israelites, who would no doubt be unlikely to stand up to so (apparently) formidable a foe. After all, according to the story, Goliath came out for forty days with nobody answering the challenge.
So David comes along at the bidding of his father to catch the latest news of his brothers who are serving at war. He overhears some people talking about how they are certain that Saul will richly reward the man who defeats Goliath. David decides that surely, he is that man.
David goes to Saul and says he will fight Goliath, and at first, Saul is having a hard time accepting that David has much of a chance. David tells Saul that in the course of his duties watching over his father's flocks, he has at various times had to fight a lion and a bear and in both cases, won. David says that fighting Goliath should be no more difficult.
Saul finally consents, and gives David his armor, which David decides he'd be better off without. So contrary to what people expect from a warrior, David goes into battle with no armor and no sword, and Goliath laughs at him. But as David says, "Thou comest to me with a sword, and with a spear, and with a shield: but I come to thee in the name of the LORD of hosts, the God of the armies of Israel, whom thou hast defied." David slings a single stone, and Goliath goes down. Did the stone kill him, or the sword? Who knows? Is it really important? If Goliath had not been hit by the stone, he wouldn't have died, but we weren't completely sure he was dead until David chopped off his head. All of this is violent, yes, but it's war.
Who killed Goliath? An interesting question for those not familiar with the Bible, who would be surprised that the Bible claims in 2Sam 21:19 that it was a man named Elhanan. As the SAB points out, the KJV translators inserted an unsupported phrase to fix the contradiction, except... Is it totally unsupported? 1Chron 20:5 reads "...Elhanan the son of Jair slew Lahmi the brother of Goliath the Gittite..." There's definitely some problems with this verse in 2Samuel, as the gist of the verse contradicts with our story, but the KJV translators were not totally without merit for inserting this fix. (I don't think most modern translations fiddle with this verse, nor should they.)
As I said previously, I think this story comes chronologically before most of the latter events in chapter 16, and this is actually the first time that Saul and David met. Note however that there is some oddity nonetheless in the phrasing of the latter part of this chapter, since Saul acts like he doesn't know who David is, even though he definitely had just met him minutes beforehand. I think it's quite likely that a fair amount of this confusion is not so much about not knowing David as it is about finding it hard to believe that someone as small and as young as David could have prevailed, and Saul is saying, "Wait, did I miss something? Who was that again? Where did you come from, kid?"