Firewalls come in 2 different types. There are the Hardware Base firewalls and then there is the Software Base.
For Hardware Base on the consumer side, a DSL/Cable router has a built in firewall with default settings already setup to block certain ports. Now the word default should ring a bell. There is also a default password to access these devices which is usually based on the brand. These hackers already know this as it is like a padlock on it with the key in the lock. The first thing that you want to do is change the default password. Now as for as the other settings, unless you really understand what they are, it is best to leave as for your best protection. You see a firewall can work 2 ways. Blocking traffic coming in and also blocking traffic going out. If you do not understand what you are doing when making these changes, you can prevent yourself from accessing the internet altogether. The best thing to do usually is just change the password, take the key out the lock, and for the most part your done.
Now for the Software Base firewalls, they work with the same intensions but they reside in memory and run in the background when your computer is on. Since the introduction of Windows XP, a Software Base firewall is included with Windows. However the 1st version of XP before Service Pack 1 was introduced, the default setting was Turn Off by default. I guess the reason for this was during the build up before the launch of XP, internet connection was primarly Dial Up and broadband was far and few between. This basic firewall was very basic and if any type of networking was used, it would not allow for basic networking connection to allow computers to see each other unless it was configured to do so. Well broadband caught on very fast and with the introduction of XP Service Pack 1, it was turn On by default. Microsoft caught a lot of slack for this omission with the original introduction of XP. This firewall included with Windows is a very basic firewall program, however is has improved with XP Service Pack 2.
There are number of other 3rd party firewall software programs out there that are very good and offer more features. Example of one feature is that it not only monitors the traffic coming and going to your pc, Alarms are displayed to bring it to your attention of what is bombarding your system. They will also in a reverse way let you know if your system is accessing the internet. Now if something is bombarding you, it is usually something that invited them to you. That is a email that should have not been opened or a hostile website that you visited or a virus or spyware on your computer. Depending on the nature of the attack, a firewall is one of 4 Basic features on a computer that needs to be always up to date. The virus program did not detect the virus if it was a virus, the spyware program did not detect the spyware if it was spyware, your computer browser allowed the site to harm your computer if it was a site.