(Today's passage covers Ishbosheth's murder, David's conquest of Jerusalem and some Philistine armies, the return of the Ark to Jerusalem, and God's promise to David that he'll establish his line forever.)
As 2 Samuel 5 opens, David is the undisputed king over all Israel. All the tribes have pledged their allegiance to him, and all that remains is for him to set himself up in proper kingly style. He is, I should mention, 37 years old, and will reign until he's 70, which isn't a bad run in the "king" trade. (2 Sam. 5:4-5)
The first order of business is to find himself a capital. David choses the city of Jerusalem, which until now hasn't been a particularly important city, all things considered. Despite the overconfident boasting of the inhabitants that David can be held off by "the blind and the lame," David conquers the city and names it after himself. (2 Sam. 5:6-10)
Now there's the issue of having a proper kingly residence, which is provided -- surprisingly enough -- by Hiram, king of Tyre. Hiram not only sends David cedar trees, but also carpenters and masons to build a palace (NIV; "house" in the KJV) suitable for him. (2 Sam. 5:11-12) Meanwhile, David settles down with more wives, more concubines, and produces yet more children. Eleven of the sons are named, so David's got at least a dozen new children who will, we presume, all be vying for the throne eventually. (2 Sam. 5:13-16)
So David's got a city, he's got a palace, and he's got heirs. The only thing that's missing is the ark, which is still at Abinadab's house, where it was left in 1 Sam. 7. David gathers up 30,000 men to go return the ark to the City of David (aka Jerusalem). They play music. They dance. But then something happens: as the ark is jostled, Uzzah, Abinadab's son, reaches out a hand to steady it. This, as we've learned from previous books, is a Really Bad Idea. God hates it when people touch his ark, so he kills Uzzah right on the spot. (2 Sam. 6:6-7)
David is so frightened by the whole experience that he leaves the ark at the house of Obed-Edom, a Gittite. It isn't until he sees how much God blesses Obed-Edom that David decides to finally bring the ark into Jerusalem, three months later. Again the dancing, again the music-making. In a wonderful turn of phrase, "David danced before the LORD with all his might." (2 Sam. 6:14, KJV) The ark is returned with great spectacle, sacrifices, and blessings.
But all is not well. Michal, David's first wife, recently returned to him at his specific request, doesn't like all this merry-making going on with the servant girls. She complains that David "uncovered himself" (KJV) before the servants. David dismisses this out of hand, and then presumably never sleeps with her again, because she dies childless. (2 Sam. 6:16-23)
And so, with the exception of Michal and the Philistine leaders, everyone is happy. The ark is back, Jerusalem is conquered, and David is the undisputed king over all Israel. Long live the king!