God chooses a shepherd to be king and promises him an everlasting throne.
The story
Anointed as a youth, David defeats Goliath in the name of the LORD and later reigns from Jerusalem. God covenants that his house and kingdom shall be established for ever, a promise fulfilled in Jesus, the Son of David.
What it teaches
The LORD looks on the heart. The King we need comes from David's line.
In the Scriptures
But the LORD said unto Samuel, Look not on his countenance, or on the height of his stature; because I have refused him: for the Lord seeth not as man seeth; for man looketh on the outward appearance, but the LORD looketh on the heart. 1 Samuel 16:7 · KJV
Then said David to the Philistine, 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. 1 Samuel 17:45 · KJV
And thine house and thy kingdom shall be established for ever before thee: thy throne shall be established for ever. 2 Samuel 7:16 · KJV
He shall be great, and shall be called the Son of the Highest: and the Lord God shall give unto him the throne of his father David: Luke 1:32 · KJV