"some viruses may have evolved from bits of DNA or RNA that "escaped" from the genes of a larger organism (the vagrancy hypothesis or escape hypothesis); or viruses could have evolved from complex molecules of protein and nucleic acid at the same time as cells first appeared on earth (the virus-first hypothesis)."
But viruses have always been here in one way shape or form of the way. When we finally put a name to it ? That's another story.