Computer viruses attach itself to a program or file and spreads from one PC to another. The virus does not affect the host machine unless the virus infected file is opened. Most such virus infected files are .exe executable spread as attachments via email.
Computer worms are more sophisticated than the virus such that it not only damages the host computer but maintains a copy for future damage and also usually has intelligence built into it to execute without requiring the user to actually open the infected file. example: in an infected machine it could email itself to all names in your address book.