A firewall blocks unsolicited packets from entering the system. That's all it does.
It does not block malicious payloads if something behind the firewall requests (or allows) the asset to be requested.
Without one, you would be compromised within seconds, from the Internet background noise & bots seeking open ports.
4 short videos explain the concepts of this in terms of a NAT router, which is a hardware firewall (as opposed to a software or 'internal' firewall), both of which refuse (or 'drop') unrequested packets.
http://www.askmisterwizard.com/EZINE/SecurityNow/SN003/SN003AllS.htm
The upper left (A) explains the basic concepts, and the others go into more specific cases of NAT routers functions and the interplay it has with various configurations. (Originally from the 'Security Now' podcasts.)
After absorbing the video concepts, be aware that the main conduit into the computer is the browser, and unless it is modified from the 'stock' configurations, will request many assets other than a webpage you want to look at...which is what the bad guys use to insert malicious payloads into your computer.