river said:
Retroviruses are a class of RNA viruses whose RNA is transcribed backwards (that was once thought to be impossible) into DNA. (There are other kinds of RNA viruses as well, whose RNA acts like messenger RNA and generates proteins more directly.) There are theoretical reasons to speculate that retroviruses may be among the earliest viruses and date back to the time the first cells appeared. The most familiar kind of retrovirus today might be the Aids/HIV virus.
More on the varieties of viruses here:
https://en.wikipedia.org/wiki/Baltimore_classification
The thing with retroviruses is that the DNA they induce the cell to make can be inserted into the cell's own genome. So if the cell doesn't die, it passes the viral-derived DNA down as it divides, along with its own DNA. If that happens in germ cells and gets into eggs and sperm, it can pass from generation to generation indefinitely
https://en.wikipedia.org/wiki/Retrovirus
An endogenous retrovirus is a retrovirus that no longer circulates freely in the environment as a virus and is only found in fossil form, so to speak, in the genes that a long-ago retrovirus once inserted into the genome, that are still passed down. It's estimated that 5-8% of our human genome consists of these ancient viruses. They seem to all be scraps of ancient virus genome and no longer can code for complete viruses. Most of them seem to be very old, millions of years.
https://en.wikipedia.org/wiki/Endogenous_retrovirus
Finding the same ones in related taxa can be evidence of common descent, since the simplest explanation for their presence is that the long-gone retrovirus once infected a distant common ancestor.
But despite not being able to code for a complete virus, some of the endogenous retroviral fragments do code for proteins that are important in various cellular processes, so natural selection has seemingly found a use for them over the years. The idea of non-human DNA in our genomes sounds icky, but we've evolved to the point where we need those genes.