This psalm stands as one of the best definitions of God's praise. If we want to know how to praise Him, then we need merely summarize the content of this psalm. The psalm makes it clear that such praise is just telling about the good things God has done, and this psalm does it magnificently.
The background of the psalm is that David had recently concluded the most difficult period of his life, the period during which he was constantly persecuted and pursued by Saul. It was a period during which he had God's promise to make him king, but it was also a time during which the fulfillment of that promise seemed extremely remote. But in this psalm David describes poetically how God successfully brought him through that period so that he now could indeed wear the crown of God's nation Israel!
An important thing for us to remember, though, is that God did these things in order to fulfill His promise, not only to David, but also to Israel itself. In giving them David as king, He was giving them a "man after His own heart," and He was in that way establishing the blessing of His covenant sovereignty over them. For that reason, all that God did, all the things for which this psalm praises Him, are things He has done not only for David, but for His covenant people Israel as well. Since God doesn't change, we can truthfully say that it's a song about how God will ALWAYS act toward His people. In other words, He's just that kind of God!
Looking back, then, at the wonderful things the Lord has done, the songleader begins by singing out His feelings for such a God. He sings, "I will love You O Lord, my strength. The Lord is my rock and my fortress and my deliverer; My God, my strength, in Whom I will trust; my shield and the horn of my salvation, my stronghold!" So David first and all of God's people ever after confess that it is GOD alone Who has brought them through troubles. They will therefore always love Him and trust Him. In fact, as a resounding summary of all the psalmist wants to say, they sing, "I will call upon the Lord, Who is worthy to be praised; so shall I be saved from my enemies!" That's what David has learned from the difficult years, and that's what Israel should learn from him. The trouble God's people must face is worth it!
David then proceeds to describe some of the difficulties through which he's come. He sings of fears of death, floods of ungodliness that threatened to sweep him away, the hopelessness of a sheol (the place of the dead) that was reaching up to grasp him in a never-relenting hold, the snares of death on every hand - but also the wonderful, saving availability of prayer to a powerful and caring God.
Then he goes on to sing of God's answer - of His powerful intervention in his daily struggles. That intervention can only be described poetically - no ordinary words could adequately describe it. He has to use powerful imagery, imagery that, at best, can only give us a little feeling for the power and wonder of God's acts. He says, "Then the earth shook and trembled; the foundations of the hills also quaked and were shaken. Because He was angry, smoke went up from His nostrils, and devouring fire from His mouth . . ." It's an overwhelmingly powerful scene. It's as though, upon hearing David's prayer, God became angry at his enemy and flew like the wind to help him!
Then, still using imagery, he sings that "the Lord thundered from heaven, and the Most High uttered His voice - hailstones and coals of fire!" It's as though God commanded all nature to conspire together against David's enemies.
The result of this intervention on God's part was that David was delivered. Expressed poetically, the psalm sings that "He sent from above, He took me; He drew me out of many waters. He delivered me from my strong enemy, from those who hated me, for they were too strong for me - they confronted me in the day of my calamity. But the LORD was my support. He also brought me into a broad place - He delivered me because He delighted in me!"
David knew in his own heart that he had never tried to take Saul's kingdom, but that he had constantly sought only good for "God's anointed." He could therefore sing, "The Lord rewarded me according to my righteousness; according to the cleanness of my hands He has recompensed me." In fact he could sincerely sing, "I was also blameless before Him, and I kept myself from my iniquity (he knew he was a fallen sinner). Therefore the Lord has recompensed me according to my righteousness, according to the cleanness of my hands in His sight!" God loves righteousness!
With all this in mind, David goes on singing of what a good and gracious Lord he serves. He says, "With the merciful You will show Yourself merciful; with a blameless man You will show Yourself blameless; with the pure You will show Yourself pure; and with the devious You will show Yourself shrewd: You will save the humble people, but will bring down haughty looks." That's the kind of God Who helped David, and that's the kind of God Who will always help all of His people!
The song goes on to express how God's strength became David's strength against his enemies, and it concludes with still more praise. He says, "For who is God, except the Lord? And Who is a rock, except our God? It is GOD Who arms me with strength, and makes my way perfect. HE makes my feet like the feet of deer, and sets me on my high places. HE teaches my hands to make war, so that my arms can bend a bow of bronze.
Finally, though, even imagery can't adequately describe the goodness of God, so David just uses plain words. He sings, no doubt at the top of his voice, "You have also given me the shield of Your salvation; Your right hand has held me up. Your gentleness has made me great!"
Then he goes on to describe in detail the victory God has brought about. He says, "I have pursued my enemies and overtaken them; neither did I turn back again till they were destroyed!" God has DONE it! He has brought him through! He has given him the crown! David has to look, open mouthed, at the wonderful things God has done. He sings, "You have delivered me from the strivings of the people; You have made me the head of the nations; a people I have not known shall serve me - as soon as they hear of me they obey me; the foreigners submit to me!"
It is the LORD alone Who has done all this, and David knows it, so he brings the song to a resounding conclusion by singing, "The Lord lives! Blessed be my Rock! Let the God of my salvation be exalted! It is GOD Who avenges me, and subdues the people under me!. . . Therefore I will give thanks to You, O Lord, among the Gentiles (because, due to the wonderful salvation of the Lord, his kingdom will spread even that far!) and sing praises to Your Name: great deliverance He gives to His king, and shows mercy to His anointed, to David and his descendants forevermore!"
You and I need to remember that this is not merely a song about David's victories. Instead it's a song about the victories of all of God's people in all ages through the Lord Jesus Christ. It's a song about the God Who truly hears us when we call on Him, about the God Who can and does deliver us from all the power of sin and the Devil, from enemies much too powerful for us. He will ALWAYS be our victory. HE will be our final salvation!