Layers of Defense

Cyber Security is not different to any ancient concept of Security: Layers of Defense within each other. Just have a look at your local Castle: Walls within walls and locked doors within locked doors. But wait. How does this work with firewalls?