Retroviruses reproduce by inserting their own DNA into that of a cell, which then starts building more of those viruses. Usually this is lethal to the cell, which at one time bursts.
However, occasionally it happens that the insertion of the virus' DNA is incorrect, and that it does not turn the cell into a virus factory. It survives the infection.
In even more rare cases it happens that this cell is a semen cell or an ovary (or one of those cells which are responsible for the production of those).
If this happens, then the individual that grows from it will have the inserted DNA in ALL its own cells, including the sex cells of that individual. This way the inserted sequence of DNA can spread through the population, by genetic drift, over the course of many generations (unless it is seriously detrimental, that is).
This has happened in the past, and such sequences could be identified in humans and other primates.
Humans have some unique sequences, but we also share some with chimps and gorillas. No other primate has this sequence in its genome, which is exactly what one would expect if the insertion happened before the speciation events that divided humans, chimps and gorillas from each other.
There are several other such sequences, and they fit exactly the phylogenetic tree of the theory of evolution. We do not see such sequences being shared by humans and orang utans, which gorillas and chimps do not have too.
This is a particularly good evidence for common descent, because the "common designer" argument doesn't work here. These sequences are not the result of design (or evolutionary development), but of an infection with a specific type of retrovirus.
Coincidence is extremely unlikely too, as the sequences do not only fit the predicted pattern of distribution, but they also are found in exactly the same part of the genome of the affected species - and retroviral insertions otherwise happen at a random place. One out of like six billion possible places each.