As 2 Samuel begins, the dust is settling after the big battle between Saul and the Philistines. David's down in the dumps over the deaths of Saul and Jonathan, lamenting and writing a pretty catchy (if sad) song about it. But of course, this clears the way for him to ascend to the kingship of all Israel… Almost. Except Saul's son Ishbaal wants to be king, too.
And like that, it's on.
David's forces end up winning a decisive victory over Ishbaal—who is later beheaded by a pair of home-invading hooligans. This frees up David to launch successful military expeditions and conquests, giving "what for" to enemies as varied as the Ammonites, the Philistines, the Arameans, and the Moabites. In his greatest moment of triumph, he brings the Ark of the Covenant into Jerusalem. Leaping and dancing in front of the Ark—and thus, in front of God—David puts even the most expert "Dance, Dance Revolution" fanatic to shame.
But David's not perfect. He has flaws. He seduces his general Uriah's wife, Bathsheba, and then arranges for Uriah to die in battle. God and the prophet Nathan help set him right, but the child David conceives with Bathsheba (now his wife) dies as punishment, despite David's attempts to fast and repent.
David suffers his greatest tribulations when his son Absalom revolts. Absalom had originally murdered his brother Amnon for raping his sister Tamar—though he's forgiven for this unauthorized act of vengeance, he ends up leading a popular rebellion. Against David's orders, his top general, Joab, kills Absalom on the field of fight, causing David to lock himself in his room, weeping. However, this helps bring out David's more compassionate side.
After that, David fights some more battles and puts down another rebellion. For some reason, God provokes David to violate the law by holding a census, and Israel is punished with three days of pestilence, killing tens of thousands of people. David propitiates God and sets everything to rights—which is where the Second Book of Samuel ends.