A firewall is either a software or hardware appliance that acts as a gatekeeper of data being sent between two different networks (Usually a Local Area Network and the Internet).
They work by allowing the user to set certain “rules” for both incoming and outbound traffic involved with the data transfer. A firewall is a great asset to any computer user because it can effectively block any malicious attacks coming in, and also control what kind of information is being sent out by the computer.