Computer viruses are malicious software programs that can affect various components of a computer system. They can corrupt files on the hard drive, occupy space in the RAM to slow down performance, and intercept keystrokes from the keyboard. Therefore, they can affect all of these components.