Psalm 48's title says it is A Song, A Psalm by the sons of Korah. It praises God for his city. Great is Yahweh, and greatly to be praised, in the city of our God, in his holy mountain. Beautiful in elevation, the joy of the whole earth, is Mount Zion, the city of the great King. The writer makes clear that the city is safe because of God: God has shown himself in her citadels as a refuge.
The middle of the psalm tells of danger turned away. The kings assembled themselves, but they saw it, then they were amazed. They were dismayed. They hurried away. Trembling took hold of them. The psalm adds that God breaks the ships of Tarshish with the east wind. The people respond, As we have heard, so we have seen, in the city of Yahweh of Armies. God will establish it forever. They think about God's loving kindness in his temple, and they say his praise reaches to the ends of the earth.
The ending gives a task. Walk about Zion, and go around her. Number its towers. Notice her bulwarks. Consider her palaces, that you may tell it to the next generation. Looking closely at what God has done prepares people to pass on their faith. The final verse is the reason: For this God is our God forever and ever. He will be our guide even to death. God leads his people through all of life, to the very end. In the New Testament, Jesus says, I am with you always, even to the end of the age (Matthew 28:20).