Viruses evolved from complex molecules of nucleic acid and proteins around the same time as the first cells appeared on Earth. A virus is a small, infectious agent that replicates only inside the living cells of an organism, they can infect all types of life, from plants to animals to microorganisms (including bacteria and archaea).
Hope this helps!
Have a nice day (: