Not unless the firewall is specifically designed to do so. Many firewalls are not designed to filter out such things -- which would by extension also include filtering things like viruses in e-mail. There are now a couple of products that do this -- for instance, FlyAYaSoft's Adware and Spyware Firewall (http://www.flyyasoft.com/SpyFirewall.htm) -- and antivirus software vendors are now taking spyware a little more seriously as a threat.
In the meantime, there's standalone programs like SpyBot Search and Destroy (see related FAQ entry), which do a good job of filtering, but only after-the-fact.
This was first published in March 2004