The Book of Samuel forms part of the narrative history of Israel in the Nevi'im or "prophets" section of the Hebrew Bible/Old Testament called the Deuteronomistic history, a series of books (Joshua, Judges, Samuel, and Kings) that constitute a theological history of the Israelites and aim to explain God's law for Israel under the guidance of the prophets. According to Jewish tradition, the book was written by Samuel, with additions by the prophets Gad and Nathan. Modern scholarly thinking is that the entire Deuteronomistic history was composed in the period c. 630-540 BC by combining a number of independent texts of various ages.
Samuel begins with the prophet Samuel's birth and God's call to him as a boy. The story of the Ark of the Covenant that follows tells of Israel's oppression by the Philistines, which brought about Samuel's anointing of Saul as Israel's first king. But Saul proved unworthy and God's choice turned to David, who defeated Israel's enemies, purchased the threshing floor (2 Samuel 24:24), where his son, Solomon built the Temple and brought the Ark to Jerusalem. God then promised David and his successors an everlasting dynasty.