A computer virus is a program that can copy itself and spread from one computer to another, often through email attachments, downloads from untrusted websites, or pirated software. The most common way viruses enter computers is via the internet by opening email attachments, downloading files, or visiting infected websites, as viruses can hide in files and spread before being detected.