A shepherd boy, a giant, and a sling — the story broken into clear steps, from 1 Samuel 17.
The Philistine and Israelite armies face off across a valley, and for forty days the Philistine champion Goliath — described as over nine feet tall, armored head to foot — comes out twice a day to taunt Israel, daring anyone to fight him one-on-one. Saul and the entire Israelite army are described as “dismayed, and greatly afraid.” No one volunteers.
David, still a young shepherd too young for the army, is sent by his father to bring food to his older brothers serving in Saul's camp. Hearing Goliath's taunts and seeing the army's fear, David is bewildered that no one will fight — “who is this uncircumcised Philistine, that he should defy the armies of the living God?” His questions eventually reach Saul.
Saul reluctantly agrees to let David fight and offers his own armor and sword, but David, unused to them, takes them off. He chooses instead five smooth stones from a brook and his shepherd's sling — the same tools he says he used to kill lions and bears that attacked his father's flock.
As Goliath closes in, mocking David for coming at him “with a sword, and with a spear, and with a shield,” David answers: “This day will the Lord deliver thee into mine hand… that all the earth may know that there is a God in Israel.” Running to meet him, David slings a single stone into Goliath's forehead. “So David prevailed over the Philistine with a sling and with a stone… but there was no sword in the hand of David.”
David uses Goliath's own sword to finish him and cut off his head, and the Philistine army, seeing their champion dead, breaks and flees. The victory launches David's rise from shepherd boy to Saul's court, and eventually to king of Israel.
Goliath's height is given as “six cubits and a span” — roughly 9 feet 9 inches by the traditional Hebrew text, though some ancient manuscripts give a shorter (still formidable) 6 feet 9 inches.
Ancient slingers were skilled, dangerous combatants capable of hitting targets with lethal force and accuracy — David's choice wasn't a desperate improvisation but his area of genuine skill.
This is the first time David appears as a major figure in the biblical narrative, setting up his later rise to become Israel's second king.