A computer virus is defined as a program that hides in computer systems, usually in larger programs, whose mission is to replicate and spread until the occurrence of some designated event. When this event takes place, the program can then perform some action specified by its creator.
Viruses are a threat to the security and integrity of computer systems.
They can spread from program to program, and from system to system, without direct human intervention. Once in a computer system, a virus can remain quiet for a period of time, during which it infects other files. After some prespecified event, such as a period of time or a number of infections, the virus can come to life and begin an attack. Meanwhile, the offsprings of the virus are infecting other programs. There are basically two types of viruses, innocuous and malicious.