There are several different types of viruses.
The most common "universe" where viruses are known to exist is the world of biology.
The second universe where viruses exist is the man-made world of computers, networks, data, and programming. These types of viruses were not discovered in this world, instead they were invented- programmed.
In one of the best-known incidents of inventing a computer virus, Robert Tappan Morris, Jr., a student at Cornell university, tried an unauthorized experiment on a government-funded nationwide computer network in November of 1988. The original intent, according to him, was to gauge the size of the Internet. He released the worm/virus from MIT to conceal the fact that it actually originated from Cornell. The worm was designed to count how many machines were connected to the internet. Unknown to Morris, the worm had a design flaw. The worm was programmed to check each computer it found to determine if the infection was already present. However, Morris believed that some administrators might try to defeat his worm by instructing the computer to report a false positive. To compensate for this possibility, Morris directed the worm to copy itself anyway, 14% of the time, no matter the response to the infection-status interrogation. This level of replication proved excessive and the worm spread rapidly, infecting several thousand computers. It was estimated that the cost of "potential loss in productivity" caused by the worm at each system ranged from $20,000 to more than $530,000.
The point is that a "computer virus" creates millions of copies of itself and the Morris Virus kept going after it was supposed to stop, clogging up the entire network. The Government officials considered this bit of hacking so serious that they charged the astonished student with federal crimes. his program, which came to be known as the first Internet Worm, was a form of computer virus. He had tapped into the almost limitless power of a virus once it had been unleashed, and at the same time experienced the loss of any control over the Virus by its creator.
By now, the term computer virus is well known. But this electronic form of virus proves to be almost as difficult to cure as the biological kind. An antivirus industry has sprung up around it, capitalizing on the fact that computer programs are much easier to understand than DNA. Regular updates of programs with names like Vaccine, Dr. Virus, AVG, Norton and Antivirus (allegedly) keep computers free of most known strains, but vandals continue to create more and more.
For more information on this topic, please read Virus of the Mind