well, viruses themselves don't actually mutate. the dna replication mechanisms within the host cell is usually what causes the virus to mutate. sometimes UV or carcinogenic chemicals will cause changes in virus' DNA, but it's usually mistakes in replication that causes mutations.
and i'm not too sure about our own genome being "infected." there might be remnants of viral genes, but the fact that they're inactive means that we're not really infected.
anyway, to answer your question, nobody really knows how they originated. there's the classic experiment (i forget the researcher) that as able to make organic molcules simply by mixing basic elements (O, N, H, etc.) and applying an electric charge. the idea is that, more complicated molecules arose through spontaneous chemical reactions eventually leading to organelles and then single-celled organisms. pretty much intro evolution which i took 4 years ago, so i'll be damned if i remember more than just the basic principles.
=|