This is a little anecdote to illustrate some of the quirks of DNA research, Suppose two men, Harry Smith and Gerry Smith, were known to live in the same vicinity at about the same time (say, Accomack County, Virginia in the early 18th century). Each man has descendants down to the present day, and some descendants decide to get DNA-tested to see if they are related.
Y-DNA results say no, the two men weren't even in the same haplogroup, so despite the matching surnames they weren't related *that* way.
Autosomal DNA results do show indications of a relationship (which should not be a surprise, since Accomack County is the sort of place where everybody is related to everybody else one way and another, sooner or later).
The question then becomes, *how* are they related? Not by straight line male descent, not this side of the Stone Age.
Both families kept fairly good records, which allows the construction of fairly reliable paper trails, and it is discovered that Smith men from both families kept marrying women from the neighboring Jones family. So what the autosomal results are showing is a combined Smith-Jones descent. (Autosomal is the only form of DNA research that *can* show this, if the "signal" is clear enough.)
In our hypothetical example it starts with Harry Smith marrying Mary Jones, while Gerry Smith married her sister Elizabeth. A couple of generations down the line, the pattern repeats, perhaps several times - the Smith male lines never directly cross, but there's a lot of Jones in- and out-marriage, including marriage of Jones-Smith cousins. (It's Accomack County, Jake!)
So while their descendants *are* related by descent, Harry and Gerry Smith are related only by marriage.
(In the real world there would be a dozen or more families involved, and the relationships would get *very* complex - this is a drastically simplified example.)