Firewall is a network security system that monitors and controls incoming and outgoing network traffic. It acts as a digital gatekeeper, filtering data packets based on predefined rules to protect a network or a computer system from unauthorized access or malicious attacks.