At the beginning, David was a young boy and worked as a shepherd. One day he was called to help in the war against the philistines.
Afterwards he packed up and off he went to the war. He traveled through night and day.
When arriving at the sight, he was greeted by Saul and his men. While talking to Saul, David is introduced to Goliath and his challenge. David then takes on his challenge and beats Goliath.
After a while, Saul turns against David after hearing songs about David's accomplishments. While searching for David, Saul uses the bathroom in the same cave of David. David showing his generosity, only cuts off part of his linen off. Saul is grateful for this act.
Soon, David is then confronted by Ishbaal later once Saul has passed away. They then have a war. This war soon leads to Ishbaal's demise.
Once all problems are dealt with, David is then warned about future problems and does not deal with them until the time arrives.