A computer virus is a program that can copy itself and infect computers without permission. It spreads by inserting its code into other files and programs and transferring to other computers via removable media or over networks. Anti-virus software detects viruses by scanning files and memory for known virus signatures or common behaviors. Regularly updating anti-virus software and backing up data on non-networked media can help prevent virus damage.