A computer virus attaches itself to a program or file enabling it to spread from one computer to another, leaving infections as it travels
A worm is similar to a virus by design and is considered to be a sub-class of a virus. Worms spread from computer to computer, but unlike a virus, it has the capability to travel without any human action. i.e. It can attach itself to e-mails and use your address book to distribute them.