Ps 20:1 The Lord hear thee in the day of trouble; the name of the God of Jacob defend thee;
:2 Send thee help from the sanctuary, and strengthen thee out of Zion;
:3 remember all thy offerings, and accept thy burnt sacrifice; Selah.
:4 Grant thee according tot Thine own heart, and fulfil all they counsel.
:5 We will rejoice in they salvation and in the name of our God we will set up our banners: the Lord fulfil all thy petitions.
:6 Now know I that the Lord saveth His anointed; He will hear him from His holy heaven with the saving strength of His right hand.
:7 Some trust in chariots and some in horses: but we will remember the Name of the Lord our God.
:8 They are brought down and fallen: but we are risen and stand upright.
:9 Save, Lord: let the king hear us when we call,
David learned a valuable lesson when he fought Goliath. He learned to fight in the name of God. The battle belonged to God. He taught his men the same thing. They were (and we are) to fight well, but ultimately the battle is the Lord's to win.
This psalm was a prayer the people prayed before the king went to war. Most of us are not in a physical war as David was, but we still face battles with the devil daily. We face spiritual attacks and temptations. We can pray this also.