Psalm 20(New International Version)
For the director of music. A psalm of David.
1 May the LORD answer you when you are in distress;
may the name of the God of Jacob protect you.
2 May he send you help from the sanctuary
and grant you support from Zion.
3 May he remember all your sacrifices
and accept your burnt offerings.
4 May he give you the desire of your heart
and make all your plans succeed.
5 May we shout for joy over your victory
and lift up our banners in the name of our God.
May the LORD grant all your requests.
6 Now this I know:
The LORD gives victory to his anointed.
He answers him from his heavenly sanctuary
with the victorious power of his right hand.
7 Some trust in chariots and some in horses,
but we trust in the name of the LORD our God.
8 They are brought to their knees and fall,
but we rise up and stand firm.
9 LORD, give victory to the king!
Answer us when we call!
He was a "man after God's own heart"; he made the main focus of his life to be fully devoted to God. Not that he was always obedient, and not that he never suffered from human failures, but in all things he was totally devoted to God. That is why there are many Psalms from David. He spent his time seeking and crying out to God, and when he was rescued by God, he would give him praise.
I call this psalm "David's Prayer", because each of the first five verses are prayers lifted up to God. These are prayers as simple and substantive today as they were over 3000 years ago when they were written. They are prayers that we can pray for ourselves or for others.
After these prayers, David tells us what he knows about God; he simply states why he has trust in God, and he compares it to those who don't do the same. He tells us that God does good things for His people, and because of this we can ask Him to hear our prayers.