Microsoft and Apple both provide built-in firewalls. To enable the firewall, follow the directions below for your specific operating system.
Whenever your computer is connected to the Internet, chances are that someone or something is scanning it for vulnerabilities that could allow a virus, worm, or hacker to cause damage or take control. By enabling the firewall built into your computer's operating system, you can block this unwanted network traffic and protect your computer from attack. Enabling the firewall is every bit as important as using antivirus/malware protection.
Note 1: Some antivirus/malware protection products are also sold in "suite" form, in which they are bundled with other technologies such as a "personal" firewall, anti-spyware, identity theft protection, etc. Usually, these products will disable the operating system firewall and use their built-in firewall instead; this allows them to provide "active" protection against threats. Some products will give you a choice about which firewall to use and some won't, but generally it's better to use the suite's built-in firewall rather than the operating system firewall, if given a choice.
Note 2: Most home wireless routers include a network firewall. Although these firewalls offer valuable protection and should be turned on whenever possible, they do not provide the same protection that the operating system firewall (or a malware protection suite's firewall) provides. Even if you have a firewall enabled on your wireless router, you should still enable your operating system's firewall.