A firewall does not totally prevent flaws. However Blaster worm was prevented becuase my computers port 135 was effectivly secured.
So in theory they do prevent some - but not all.
Firewalls do secure your computer against novice and script kiddies - but are not a total protection method against pro hackers.
However most pro hackers are simply looking for my computer which runs a webserver - not the average home computer.
So a well protected home PC would be nothing of interest to a hacker.