Microsoft has built a Firewall into Windows to ensure that hackers or malicious program are stopped if they try and access your PC via the internet. You can turn the firewall on or and off and also adjust its settings, for example whether it notifies you if a program has been stopped from accessing your machine and the software that you allow to access your machine via the web.
Here's how to switch the firewall on or off in Windows 7.
From the Start Menu select the Control Panel.
Choose the System and Security option, then select Check firewall status from the section marked Windows Firewall.
You'll now be displayed with various ways you connect to the web; domain networks, home or work Wi-Fi network, or public network, along with whether the Firewall is switched on or off for these connections and whether the Firewall will notify you if a program has been blocked.
To change the settings for any of these networks, select Turn Windows Firewall on or off from the far left-hand side of the window. Then simply ensure you check the box next to Turn on Windows Firewall or Turn off Windows Firewall, depending on what you require. You also check on uncheck the boxes next to Block all incoming connections and Notify me when Windows Firewall blocks a new program. Press Ok to save the changes.