A firewall is security software that blocks unauthorized access to a computer or network (LAN, Intranet). Any communication (In and Out) is inspected by the firewall. Based on specific criteria the firewall decides if data will be blocked.
A distinction is drawn between personal and external firewall.