There are several different ways a computer can become infected. A virus is a small piece of software that attaches itself to an existing program. Every time that program is executed, the virus starts up, too, and can reproduce by attaching itself to even more programs. When contained in an email, the virus usually replicates by automatically mailing itself to dozens of people listed in the victim's email address book.
Unfortunately, viruses don't just replicate, they often cause damage. There is usually a trigger -- a command or keystroke -- that causes the virus to launch its "attack." This can be anything from leaving a silly message to erasing all of the user's data. For example, whenever the current minutes on an infected computer's clock equaled the day (for example, at 6:27 pm on the 27th of any given month), the Melissa virus would copy the following Bart Simpson quote into the current document: "Twenty-two points, plus triple-word-score, plus 50 points for using all my letters. Game's over. I'm outta here."
Worms are a different type of infection. A piece of worm software uses computer networks and security holes in specific software or operating systems to copy itself from machine to machine. Because Microsoft's Windows platform is so pervasive, for example, many hackers design their worms to exploit security holes in those products. In 2001, the worm Code Red spread rapidly by scanning the Internet for computers running Windows NT or Windows 2000.
In contrast to a worm, a Trojan horse can't replicate itself at all: it is simply a computer program pretending to be something harmless -- a game, for example -- but instead does damage when the user runs it, often erasing the hard drive.
Protect yourself from computer viruses
- Buy virus protection software and keep it up-to-date.
- Avoid downloading programs from unknown sources; stick with commercial software purchased on CD-ROMs.
- Make sure that the Macro Virus Protection feature is enabled in all Microsoft applications.
- Never double-click on an email attachment containing an executable program. These will have extensions like .exe, .com, or .vbs.
- Consider switching to a more secure operating system, like Linux.