I'm in no way any expert, just an interested user, so if you're right, the cyberworld is a great deal safer place to be in 
As I understand it, a router/firewall can be set up, so only allowed traffic goes on, and if properly set up disallows malicious outward information to be passed on. Unfortunately that demands a good deal of knowledge about, what's going on - and not everybody has that. Besides, it does not itself stop downloading of Trojans, spyware, viruses and other exotic guests, even if it stops their malicious attempts to get information out.
As far as I know, up-to-the-standard antivirus programs stop a broad range of worms and Trojans as well - but not all! There the specific anti-Trojan software comes in.
Spyware is in no way stopped by any firewall, because an unexperienced (and very easily an experienced as well!) unknowingly allows it to download. It often comes from websites with exciting free offers, and how can one know what downloads together with some seemimgly innocious fun stuff? Surely a firewall doesn't.
Finally, there do exist firewalls, who are practically inpenetrable to hackers, because they integrate deeply in the OS's core and simply shuts down, if any attempt gets too close. E.g. Bitguard.
Kind greetings
KAVN