As 2 Samuel begins, Saul and Jonathan have just died fighting the Philistines—David almost fought for the Philistines, but ended up getting excused at the last second, and headed off to fight the Amalekites.
Saul had committed suicide after seeing his defeat was inevitable (with, as it turns out, a little help), and Jonathan was killed in the battle.
A survivor from Saul's army finds David and tells him the news. It turns out the survivor was an Amalekite who (at Saul's request) helped Saul finish dying, giving him a fatal sword thrust, before bringing Saul's crown and armlet to David.
However, David is offended that this guy had the guts to help kill the Lord's anointed, so he has one of his own men kill the Amalekite.
Singing the Blues
Then, David sings the blues. In a song, he laments the deaths of Saul and Jonathan, singing, "How the mighty have fallen!"
He hails them both, paying tribute to their strength and good qualities, and telling the rest of Israel to weep for them in mourning.
He also says that Jonathan's love for him was "wonderful, passing the love of a woman," before repeating again, "How the mighty have fallen."