Under Windows 7 (as in Vista) there is a hidden firewall, that can be accessed using one of the following method:
Click on Start > Run, type the console wf.msc
Click on Start > Search programs and files > type firewall.
Open the Control Panel > Administrative tools > Windows Firewall with Advanced Security.
As you can see in the above image, by default some incoming connections to your PC are blocked. The firewall will automatically block incoming connections from websites that don't match the predefined rules.
To edit these settings:
Click on "Windows Firewall Settings"
In this window you can see three profiles.
For each of the profile you turn on Inbound connections:
You can also edit (disable, create new...) the rules:
Depending on the type of rule you want to create, click on Outbound or Inbound rules:
To create a new rule, click on "New Rule".
A wizard shall open, simply select the type of rules you want to create and follow the online instructions