Basically, a firewall, working closely with a router program, filters all network packets to determine whether to forward them toward their destination. A firewall is often installed away from the rest of the network so that no incoming request can get directly at private network resources. There are a number of firewall screening methods. A simple one is to screen requests to make sure they come from acceptable (previously identified) domain names and IP addresses.

A recommended software firewall is Zonealarm which can be downloaded free from here.

Personally I would use a hardware one, as I bought a wireless router with a firewall built in and they do the job better. You can purchase routers with firewalls built in here.