A defensive wall with openings for shooting, typically found on top of a fortress, can also refer to a parapet or railing around any flat roof.
In the Near East, houses were often built with flat roofs, which were used for various purposes:
Rahab hid two Israelite spies on her roof (Joshua 2:6)
Saul slept on Samuel’s roof (1 Samuel 9:25)
King David, from his roof, saw Bathsheba taking a bath (2 Samuel 11:2)
People celebrated on rooftops (Isaiah 22:1–2)
Peter prayed on his roof (Acts 10:9)
With so much activity on rooftops, it is easy to understand the need for the law: “If you build a new house, you are to construct a railing around your roof, so that you do not bring bloodguilt on your house if someone falls from it” (Deuteronomy 22:8).
City walls often had battlements at gates and corners to defend against attacks. The Hebrew words for these fortifications are often translated as "towers" (2 Chronicles 26:15; Zephaniah 1:16).