How Viruses Infect You
You get a virus from executing an infected file on your computer. This generally means that you must open the file or attachment to actually infect your computer. You can have an infected file on your computer forever without being infected. It's only when you open that file that you will become infected.
Note: If your antivirus program is current then it should detect and ask you to remove the infected file (which you should do).
The most common method for infection is via an email attachment, but you can also become infected from using an infected floppy disk, zip disk, or other storage media.
An infected file is usually in the form of some type of executable file. This is a file that actually performs some task when you click on it. Examples are .EXE, .COM, or .BAT files. However, viruses can also be spread through other standard files as well so don't think that just because someone is sending you a simple word processing document or picture that it is free from a virus. Especially beware of Word or Excel documents that contain macros. There are many macro viruses and the Melissa virus was one of these. The ILOVEYOU is actually not a virus like Melissa. It is known as a worm and damage from it seems to have exceeded that of the Melissa virus.