CyberForce|Q interview question

What is a firewall? How does it work?