English Basic Explanation - Chapter 28
Although it is not known in what particular context this Psalm was composed, it appears to refer to a situation in which David found himself threatened by those "who speak peacefully with their fellows, but evil in their hearts" (verse 3). David describes these men as failing to comprehend the "actions of God" (28:5), who do not recognize divine authority and thus take the liberty to lie and deceive to further their own egotistical interests. David begs God to hear his pleas and rescue him from those who pursue him without any moral constraints.
In the second half of this chapter (28:6-9), the tone changes as David offers praise and thanksgiving to God for heeding his prayers and protecting him from harm. The commentaries (Radak, Ibn Ezra) explain that David prophetically foresaw the Almighty's favorable response to his prayers, and therefore composed these verses of praise and gratitude even before he actually experienced salvation.
This Psalm concludes with the famous verse, "Hoshi'a Et Amecha…" in which David asks God to save, bless and care for Am Yisrael. Even after being extricated from his personal crises, David still does not feel entirely at ease; he remains concerned for the plight of the nation, which still faces the threats of enemy nations and confronts numerous internal challenges and struggles. The Psalm therefore does not end with David's expression of gratitude to God for saving him from his personal troubles; it concludes with the king's plea on behalf of his nation, the prayer that just as he was granted personal success, so shall the Almighty bestow blessing and prosperity upon the entire Jewish people.