DNA tests may show a shared common ancestor for people with the same surnames.
DNA creates an undisputable link between generations. It can help to reconstruct family trees petween individuals who share the same name.
Therefore, Y-DNA tests are performed to establish a relationship between male participants. Since the Y chromosome is only passed down the mal line from father to son it clearly shows relationshsips between men and can hint to a former shared common ancestor.
A female line can be proven by testing the mtDNA (mitochondrial DNA) which is passed down only from the mother to both, sons and daughters. Therefore, if we find a match in the mtDNA of two individuals then it is very likely that those two share a common maternal ancestor.