There seems to be many misconceptions about computer security. Over the next few Micro blogs I'll try to explain and demistify...
Firstly Firewalls. A firewall help protect networks from unwanted intrusions and hackers. Firewalls can be software or hardware and sit either on your computer or between you and the Internet (the internet is a big network you know). Most people have Firewall's and don't even realise. Most internet routers have firewalls, Windows XP and newer have basic built in software firewalls.
So what do they do?? Firewalls inspect the network 'traffic' and determine if its allowed through based on predefined rules, anything else gets rejected.
Basically that's it, it doesn't stop you getting viruses or downloading malicious code from websites.