a stronghold: a fortified or, more often, a rugged natural height that keeps its occupant safe from attack.
This is a word for a safe, defensible place, and in the Bible it comes in two flavors. In the stories of David it is a real location: a cave, a cliff, a rocky height where a hunted man can hold out against the people chasing him. It does not necessarily mean a building with walls and towers. More often it is a piece of rough country that is simply hard to reach and easy to defend, which is why some translators prefer "fastness" to "fortress."
In the Psalms the same picture is lifted onto God. When a psalmist calls the LORD his fortress, he takes the hard cliffs and hideouts David once ran to and confesses that the real safety was never the rock but the God behind it. The word keeps company with a small family of protection images, the crag (סֶלַע) and the secure height (מִשְׂגָּב), and together they build a portrait of God as the place you go to be out of reach of harm.
A shorter spelling that means only "stronghold" (מְצַד), never "net," is one reason a number of scholars think this fortress word may come from a different origin than the trapping word it looks identical to.