Configuring a Host Firewall
The building blocks of a secure network include a perimeter firewall, such as a router, and a personal firewall on each workstation that prevents unsolicited network requests from reaching that computer. With this basic configuration in place, you're protected from most common outside attacks. Using a stateful-inspection firewall, the only packets of information allowed to reach your computer will be those that you specifically requested, or those originating from computers on your local network over approved ports.
For a discussion of basic concepts behind network-based firewall devices and software firewalls, see Blocking Attacks by Using a Firewall. For more details about setting up and using Windows Firewall, ...