CyberForce|Q Interview Question

What is a firewall? How does it work?