David the psalmist is searching for two things in Psalm 28: Justice and Mercy.
In asking for justice, David pleads for the Lord to give him His attention and not to turn a deaf ear to him (vs. 1). He contrasts his hope in the Lord for deliverance with those who do evil - they, David insists, are the ones who should get what they deserve (vs. 4)
David, however, knows he needs mercy. He asks for it in vs. 2 and responds that his plea has been heard in vs. 6. With the merciful Lord, we can look to Him as our Rock, our strength, our shield, our fortress, and our shepherd.