A famine strikes Israel for three years. David implores God, asking him why, and finally God says that it's because Saul unjustly killed many of the Gibeonites (who are not part of Israel, but Israel was supposed to be nice to them).
So, David asks the Gibeonites how he can make this up to them. They say that they're not very interested in getting silver and gold or cash—they'd prefer having seven of Saul's sons, so that they can impale them to death.
David agrees. He spares Mephibosheth, because he loved his father (Jonathan), but hands over seven sons of Saul to the Gibeonites.
The Gibeonites impale the seven sons at the beginning of the barley harvest.
A former concubine of Saul's, Rizpah—two of whose sons were just killed in this weird sort of human sacrifice—goes and sits on sackcloth where the deaths happened, and prevents wild animals from eating the impaled bodies. Lovely.
When David hears about this, he takes the bones of Saul and Jonathan from the people of Jabesh-Gilead and gives them a proper burial to lie with Saul's ancestors. He also has people gather the bones of the impaled sons (presumably burying them properly as well.)
After all this, God removes the famine.
The Philistine Not-Football Giants
David continues to fight the Philistines, but he begins to grow weary.
A Philistine giant named Ishbibenob threatens to kill David, but is killed by Abishai before he can follow through on this threat.
David's troops tell him that he shouldn't fight with them anymore, since he's too important to lose on the battlefield.
David's warriors manage to kill other giants who've been fighting for the Philistines: Sibbecai the Hushathite kills one named Saph, a dude named Elhanan kills one named Goliath the Gittite, and David's nephew Jonathan kills a giant with six fingers on each of his hands and six toes on each of his feet.