A computer worm is a self-replicating computer program, similar to a computer virus. The main difference between the two is that a virus attaches itself to, and becomes part of, another executable program, while a worm is self-contained; it does not need to be part of another program to propagate itself. In addition to replication, a worm may be designed to do any number of things, such as delete files on a host system, or send documents via email. It should be pointed out that worms are not always bad, and in fact can be occasionally useful, for instance they could be used to upgrade software on a very large privately run network. But even if worms do not have malicious intent if they reproduce quickly enough they can consume a lot of bandwidth and slow networks.
The name 'worm' was taken from a 1970s science fiction novel by John Brunner entitled The Shockwave Rider; researchers writing an early paper on experiments in distributed computing noted the similarities between their software and the program described by Brunner, and adopted that name.
The first worm to attract wide attention, known as the Morris Worm, was written by Robert Tappan Morris, Jr at the MIT Artificial intelligence Laboratory. It was released on November 2, 1988, and quickly infected a great many of the computers on the Internet. It propagated through a number of bugs in BSD Unix and its derivatives. Morris himself was convicted under the US Computer Crime and Abuse Act, received 3 years probation, community service and a fine in excess of $10,000.