A computer worm is a self-replicating malware computer program, which uses a computer network to send copies of itself to other nodes (computers on the network) and it may do so without any user intervention. This is due to security shortcomings on the target computer. Unlike a virus, it does not need to attach itself to an existing program. 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. Types of Computer worms
These worms spread through infected email messages which may contain an attachment or a link of an infected website.
Instant Messaging Worms
These worms spread via instant messaging applications by sending links of infected websites to the entire contact list.
Internet worm tries to gain access to any vulnerable machine either by scanning the Internet and/or using the local operating system.
These worms spread through chat channels, sending infected files or links to infected websites.
File-sharing Networks Worms
These worms place a copy of themselves in a shared folder under a harmless name and thus the infected files spread P2P network. Viruses
A computer virus is a computer program that can copy itself and infect a computer. A true virus can spread from one computer to another (in some form of executable code) when its host is taken to the target computer; for instance because a user sent it over a network or the Internet, or carried it on a removable medium such as a floppy disk, CD, DVD, or USB drive. Viruses can increase their chances of spreading to other computers by infecting files on a network file system or a file system that is accessed by another computer.[3 Trojan horse
A Trojan horse, or Trojan, is software that appears to perform a desirable function for the user prior to run or install, but (perhaps in addition to the expected function) steals information or harms the system. The term is derived from the Trojan Horse story in Greek...