To sum up Sim's prevous post, a firewall is one of the tools which helps to prevent hackers gaining unauthorised access to your machine.
I can recommend ZoneAlarm Pro. It's well worth paying for and you can get it bundled with other software for search and destory missons on spyware etc.