The terms virus and worm belong to the same family, and not a single user want these two to be present in their computer systems. A computer virus is basically an infection, which attaches itself to a file in computer, and travels from one computer to another with the particular file.
Usually, virus makers attach the virus with any application and make it available for download on the internet. When a person downloads it, the virus starts spreading automatically in the computer, without user’s permission. On the other hand, worm is also regarded as similar in design to virus, and is basically a sub-category of virus.
A virus file makes the operating system installed in a computer operate in an awkward manner, as it alters the programming without user permission. On the contrary, worm does not alter the way an operating system operating, but it makes the operating system to stop working. Worms consume too much network bandwidth or system memory, which in turn, make the network or web servers and computer to stop working.
A worm does not need to be attached to a file in order to spread from one computer to another. On the other hand, a virus always needs to be attached to a file, in a bid to transfer from one computer to another.
For instance, a virus will not travel to another computer until you transfer a particular infected file using an external drive, or by network sharing. A worm will not need any file to be transferred to another computer, to travel with it. In fact, when you attach a USB flash drive with a worm infected computer, it automatically gets saved in it. The time you attach the same USB flash drive with another computer, the worm slips in the hard drive and starts spreading.
Viruses spread slowly compared to worms. Virus spread with a uniform speed as defined in their programming. On the contrary, worm does not have a particular speed, when it comes to spreading in the computer.
The virus can be attached to files such as .exe, .docx, .xlsx, .com, .ppt etc, whereas, worms can be attached to any files in the attachments or on the networks.