In fact, science still does not understand what is the virus.
The fact that these microscopic acellular parasites do not fit into the system of the living world. All known living things are made up and comes from the cells. The virus also exists only with the help of the cell to replicate itself it needs a host. If the planet suddenly disappeared all the cells, the viruses would become meaningless bubbles of proteins and DNA, are incapable of any biological function.
How did such a strange form of matter? The basic versions two.
First version: viruses are escaped genes. This scenario is not hard to imagine. In our genome there are elements called transposons, which can cut ourselves from one part of the genome and insert into another. Sometimes these "movable genes" to pick up other DNA fragments trapped in the neighborhood. It is assumed that billions of years ago one of these "movable genes" randomly gathered in one package the minimum set necessary for independent existence: on the left, for example, were "copy machine", necessary for replicating DNA, and the right "pocket knife", with which you can get in the new cage. From this moment on, gene became a virus and started to evolve separately from the parent organism.