Computer viruses are programs that damage computer systems and erase 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 infection, users should always update antivirus software weekly, back up important files, change boot sequences, avoid unexpected email attachments, install security updates, and get trained on antivirus software.