Viruses affect your computer by corrupting files, interrupting Internet traffic and taking over basic functions of your operating system. These behaviors can knock a system offline and cause crashes. Viruses can record keystrokes and screen data, and they may steal personal information and passwords to transmit back to the malware author. Particularly malicious viruses completely take over a computer and use it as a weapon against others.
While most viruses eventually cause direct damage, many modern malware suites are extremely subtle in their attacks. The goal is to infect as many systems as possible, steal information and allow the author to take over the subverted "zombie" systems for his own use. Once a virus takes over a system, it uses email programs to send out copies of itself, and it transmits packets to other systems in an attempt to break in and establish a new infection. Once a malware author has a large number of systems under his control, he can use them to attack servers by flooding them with requests from hundreds or thousands of systems at once.
In some cases, viruses even have the ability to damage the BIOS, the low-level system programs hard coded into motherboards that are responsible for the most basic functions of a computer. Fortunately, these are relatively rare due to the fact that each motherboard manufacturer uses different standards for its programs.