A worm is a variation of a virus, and is a self-replicating
program that is usually hidden
within another file and then sent as an e-mail attachment.
A worm can replicate itself on a computer or server, but it
cannot infect other files.
The best defense against a worm is to install an
antivirus program, update your
virus patterns regularly, display Windows filename extensions so you can determine the type of file you
have downloaded, and avoid
opening attachments that you are not expecting.
A firewall can prevent the spread of Internet worms by
preventing the worm from sending
information from your computer without your permission.
(so its both in and out)