This article is from the Computer Virus for New Users FAQ, by Nick firstname.lastname@example.org with numerous contributions by others.
Viruses are software programs, and they can do the same things as any other
programs running on a computer. The actual effect of any particular virus
depends on how it was programmed by the person who wrote the virus.
Some viruses are deliberately designed to damage files or otherwise
interfere with your computer's operation, while others don't do anything but
try to spread themselves around. But even the ones that just spread
themselves are harmful, since they damage files and may cause other problems
in the process of spreading.
Note that viruses can't do any damage to hardware: they won't melt down your
CPU, burn out your hard drive, cause your monitor to explode, etc. Warnings
about viruses that will physically destroy your computer are usually hoaxes,
not legitimate virus warnings.