Answer Description
A Firewall is used to restrict network access. In it's simplest form it will block TCP and UDP ports based on number or protocol, but many modern firewalls include complex algorithms to block unusual traffic, detect possible network attacks and monitor or block traffic based on many other factors.