Prior to King Saul, the people of Israel did not have a king (God was their king), and they were ruled by judges. They rebelled against this system and demanded a king, like the surrounding nations (I Samuel 10:17-19). Although God was against this, he did agree to it, authorizing Samuel to anoint Saul as king. When Saul proved himself unsuitable, Samuel was directed to anoint the shepherd boy David as king.
A parallel account of Second Samuel (about King David) is found in First Chronicles.