
In the past the majority of computer viruses were contracted from users sharing data using floppy diskettes. However, with the increased popularity of the Internet most computer viruses are contracted today through e-mail and by downloading software over the Internet or P2P sharing.
Virus properties
Below is a listing of some of the different properties a computer virus is capable of having and what the particular property is capable of doing. Keep in mind that not all viruses will have every one of these abilities.
Your computer can be infected even if files are just copied. Because some viruses are memory resident, as soon as a diskette or program is loaded into memory, the virus then attaches itself into memory and then is capable of infecting any file on the computer you have access to.

Can be Polymorphic. Some viruses have the capability of modifying their code, which means one virus could have various amounts of similar variants. This is also true with e-mail viruses that change the subject or body of the message to help from being detected.
Can be memory or non-memory resident. As mentioned earlier a virus is capable of being either memory resident where the virus first loads into memory and then infects a computer or non-memory resident where the virus code is only executed each time a file is opened.

Can be a stealth virus. Stealth viruses will first attach itself to files on the computer and then attack the computer; this causes the virus to spread more rapidly.
Viruses can carry other viruses. Because viruses are only software programs a virus may also carry other viruses making the virus more lethal and help the primary virus hide or assist the primary virus with infecting a particular section of the computer.
Can make the system never show outward signs. Some viruses can hide changes made, such as when a file was last modified making the virus more difficult to detect.
Can stay on the computer even if the computer is formatted. Some Viruses have the capability of infecting different portions of the computer such as the CMOS battery or master boot record. Finally, if a computer is completely erased and the virus is on a backup disk it can re-infect the computer.

How viruses may affect files
Viruses can affect any files; however, usually attack .com, .exe, .sys, .bin, .pif or any data files - Viruses have the capability of infecting any file; however, will infect executable files or data files, such as word or excel documents that are opened frequently and allow the virus to try infecting other files more often. Increase the files size - When infecting files, virtues will increase the size of the file; however, with more sophisticated viruses these changes can be hidden. It can delete files as the file is run - Because most files are loaded into memory, once the program is in memory the virus can delete the file used to execute the virus. It can corrupt files randomly - Some destructive viruses are not designed to destroy random data but instead randomly delete or corrupt files.

It can cause write protect errors when executing .exe files from a write protected disk - Viruses may need to write themselves to files that are executed; because of this, if a diskette is write protected, you may receive a write protection error. It can convert .exe files to .com files - Viruses may use a separate file to run the program and rename the original file to another extension so the exe is run before the com. It can reboot the computer when executed - Numerous computer viruses have been designed to cause a computer to reboot, freeze, or perform other tasks not normally exhibited by the computer.
Source: www.computerhope.com