A computer virus is a program that damages computer systems and destroys or erases data files. There are several types of viruses including time bombs, logical bombs, worms, boot sector viruses, macro viruses, Trojan horses, and script viruses. To prevent virus infections, users should always keep antivirus software updated, back up important files, change boot sequences, avoid sharing drives without passwords, empty removable disks before use, be wary of email attachments, get trained on antivirus software, have multiple backups, install all security updates promptly, and continually learn more about computer security.