Both worms and viruses have the ability to spread themselves and they both have malicious intent. They differ in that a worm is a standalone program while a virus has to attach itself to a host program.
A computer worm is a standalone malware computer program that replicates itself in order to spread to other computers. Often, it uses a computer network to spread itself, relying on security failures on the target computer to access it. Worms almost always cause at least some harm to the network, even if only by consuming bandwidth, whereas viruses almost always corrupt or modify files on a targeted computer.
Many worms are designed only to spread, and …