A computer virus is malicious software that replicates itself, infecting other programs by inserting its own code. Similar to biological viruses, computer viruses require a host to replicate and can cause significant damage, such as altering programs or destroying data. The document outlines the virus lifecycle, various types of viruses, methods of detection, and prevention strategies.