Firewalls are either hardware, connected to your network or software, installed on your computer that is designed to block unauthorized access while permitting authorized communications.
This can protect you from incoming traffic and keep unauthorized communication from getting out of your network. The protection that firewalls provide is valuable in the fight against computer infections, attempting to infiltrate your system. And if you happen to have an infection, a firewall can prevent infections from going sending and receiving more infections, instructions, or information from the Internet. Firewalls are becoming much easier to afford. Major corporations use hardware firewalls to protect their network. Now you can have the corporate protection without paying that big company price.
External (hardware) firewalls are some of the best to have, and of course more expensive. However, there are a lot of good software firewalls that you can install on your computer. Just installing one, can increase your computer security greatly.