As Psalm 20 is the anthem of God's army marching into battle, so this Psalm is a song of praise after the battle. The King has victory over all of his enemies because he trusted in the LORD.
David was writing about the victories that the LORD had given him but, as with all of the Psalms, the larger application of this royal triumph is related to David's greater Son, Jesus Christ, the King of Kings.
For believers, this Psalm can be applied to our spiritual warfare. We don't wrestle with flesh and blood, but we have a very real struggle against the very real forces of evil. This Psalm is a template prayer of praise declaring our past, present, and future victory over and deliverance from Satan and demonic power.