What is a Firewall and why is it used?

Technical