Saul was allowed to rule as king for as long as he lived. However, as he was unable to trust and obey God, God planned to have another man ready to become king after Saul died. God told Samuel to go to Bethlehem and anoint one of the sons of Jesse to be the next king.
When Samuel saw all Jesse’s sons, he thought the Lord would want Jesse’s oldest son to be the king. He really looked like he could be, but God reminded Samuel that only people look at outward appearances. God looks right into a person and sees their heart. Samuel looked at all of Jesse’s sons and finally the Lord chose the youngest son, David. David wasn’t even there when Samuel checked out his 7 brothers!
He had to be fetched from the fields where he was looking after the sheep. Samuel anointed David as the new king, but it would be many years before the time was right for David to take Saul's place. The Lord chose David even though he did not look as big as his older brothers. Samuel anointed David with oil in the presence of his family.
It is unclear whether Samuel explained to the family what this anointing was all about. Perhaps the family understood his actions, or perhaps they thought he was anointing David to be a prophet. Samuel left immediately and went back home. David returned to tending his sheep, willing to wait for the Lord God to work out things in His own time.
Meanwhile, Saul was becoming very miserable and bad tempered and his servants thought some music might soothe him. Coincidentally, David was a gifted musician. He played the lyre, which is like a small harp. He was called to come and play his lyre for King Saul and the music really helped him feel better.
Saul became really fond of David and chose him to be his armour bearer, (he carried Saul’s protective armour and weapons)
Saul was a warrior king and needed someone to do this job. David would have been very strong and fit, not just because of his youth but because, as a shepherd, he would have had to protect his sheep from predators.
Tradition holds that David wrote many of the Psalms that take up a whole book in the Old Testament part of the Bible. Psalms are songs or poems expressing praise to God, or crying out to God for help, or expressing pain and sadness. A famous one is Psalm 23 and reflects David’s early life as a shepherd
Psalm 23 (NKJV)
The Lord the Shepherd of His People - A Psalm of David.
1 The Lord is my shepherd;
I shall not want.
2 He makes me to lie down in green pastures;
He leads me beside the still waters.
3 He restores my soul;
He leads me in the paths of righteousness
For His name’s sake.
4 Yea, though I walk through the valley of the shadow of death,
I will fear no evil;
For You are with me;
Your rod and Your staff, they comfort me.
5 You prepare a table before me in the presence of my enemies;
You anoint my head with oil;
My cup runs over.
6 Surely goodness and mercy shall follow me
All the days of my life;
And I will dwell in the house of the Lord