A virus is a piece of code that's loaded onto your computer without your knowledge and runs against your wishes. It is intentionally designed to associate itself with another computer program, so that when the original program is run, the virus program will run as well. Most viruses can replicate by attaching themselves to other programs. A simple virus can make a copy of itself over and over again. There are also other virus-like programs.
Some people distinguish between general viruses and worms .
A worm can replicate itself and use memory, but can't attach itself to other programs. It copies itself to and from floppy disks or across network connections. Another virus-like program is called the Trojan horse because it is hidden inside a seemingly harmless program. When the program is run, the Trojan horse launches and performs its unwanted actions. Droppers and bombs are other virus-like programs.