A firewall is a barrier between something that is potentially dangerous and something you want to keep safe.
The term comes from the automotive industry. There is a wall of metal behind your car’s dashboard designed to keep the passengers safe should the engine catch on fire. Hence, the term “fire wall”.
In computing, a firewall is typically a networking device – often a router – that is designed to understand network traffic to some degree. Its job is to block malicious or unauthorized network traffic from crossing the firewall into a protected network.
The most common examples of a firewall are most consumer and small-business routers. These devices not only allow multiple computers to be connected to a single internet connection, but they act as a type of firewall, protecting against malicious traffic from the internet. There are also dedicated hardware appliances that act only as firewalls, and there is software that can be installed on PCs to act as a firewall as well. Recent versions of Windows include a built-in software firewall.