ITC Secure interview question

How does a firewall work?