Building Palisade Walls or Stone Walls to slow the opponent down or close parts of your base. On open maps it buys time; on closed maps such as Arena the walls are already there.
A wall does not need to hold forever. It needs to stop raiders long enough for your army, towers or Town Center arrows to respond. Gaps in a wall are often filled with buildings such as Houses or a Mill.