A firewall controls how information moves between a computer and a network to help ensure that only legitimate traffic takes place. A firewall also disguises and hides the presence of computers behind it, making it more difficult for potential intruders to find and attack them.
Hardware firewalls can be effective with little or no configuration. Typically found in broadband routers, these are considered an important part of system and network set-up, especially for anyone on a broadband connection. Software firewalls can be installed on your computer, allowing you to customize how they function and help protect your computer.
You should use both a hardware firewall and a software firewall on your own computer at all times- especially if you are using always-on broadband Internet access, because your computer is always connected to the Internet and that means you are constantly exposed to attacks from hackers and worms.