fortifications: the walls, ramparts, and earthworks that make a town defensible, and the matching works an army raises around a city it is shutting in
This word is built on a verb that means to shut something in, and everything it names is a work of enclosure: piled earth, stone walls, and towers set in a ring around a town. What changes from verse to verse is which side of that ring you are standing on.
Most of its uses are in Chronicles, in a standing phrase English Bibles render "fortified cities": towns a king builds up, stocks with food, oil, and wine, and puts a commander in, so they can hold out when an army comes. Rehoboam builds them, Shishak captures them, Asa builds more, and Jehoshaphat hands them to his sons along with silver and gold. Nahum uses the word the same way, in an order shouted to a city with an army already at the gates: guard the rampart, watch the road.
Isaiah 29:3 turns it around. There God says he will raise these works against Jerusalem himself, so the same earth and stone that keep a city safe are heaped up to strangle it. One word can cover both because both are the same kind of construction, simply pointed the other way.
It belongs to a small family of words for defended places. The close relative that names a siege and its works (מָצוֹר) leans toward the attacker's side; the ordinary word for a fortified city (מִבְצָר) names the town itself as a permanent strong point; and the common word for a stronghold (מְצוּדָה) is most often a rugged height where the ground does the defending. This word stays with what human hands built.