What does this Mizmor discuss?
Rashi (2, citing Shocher Tov): It is about Melech ha'Mashi'ach. Radak - David composed it about him with Ru'ach ha'Kodesh. Alternatively, l'David means about Mashi'ach, who is called David - "v'David Avdi Nasi Lahem l'Olam" (Yechezkel 37:25). The enemy is Gog and Magog, and their camp that will besiege Yerushalayim.
Rashi (2): We can say that it is about David himself, to refute heretics (refer to 21:1:1:3). He said it after he took Bas Sheva. Radak - l'David means about David, like I explained above (refer to 20:1:1:1). A different author composed it about him with Ru'ach ha'Kodesh.
Radak: Notzrim say that this refers to their savior. Every verse refutes them. "Hashem b'Azecha Yismach Melech" (verse 2) - without the Father's Oz, the son will be weak, without Oz! "Ta'avas Libo Nasata Lo; Ki Sekademenu [Birchos Tov]" (verses 3-4) - he depends on others! "Chayim Sha'al" (verse 5) - if he asked for his body, he did not live long! If he asked for Divinity - this shows that before, he was not Divine! "Gadol Kevodo bi'Yshu'asecha" (verse 6) - without Your salvation, his honor is not great! It does not refer to his body - it was disgraced! "Ki ha'Melech Bote'ach ba'Shem uv'Chesed Elyon Bal Yimot" (verse 8) - Divinity need not trust in another, and not Chesed to stop it from falling! His body fell - it was hung!
Malbim: It tells David's successes from when he was anointed to be king. Hashem promised that kingship will be an inheritance for his son. Afterwards he defeated his enemies, and killed two thirds of Mo'av [and kept a third for taxes]. The first two verses are an introduction, therefore it says "Selah" after them.