Remember back in biology class, where you learned that boys get X and Y chromosomes and girls get X and X chromosomes? Besides the sex chromosomes, there are other chromosomes with DNA sequences for hair color, facial features, etc.
For genealogy, a DNA test is useless you have somebody else's DNA to compare. Several companies offer testing. Ancestry currently has the largest database of customers, but they only offer the autosomal test. Family Tree DNA offers all three tests. They also have volunteers that manage certain surname and regional groups, who can help interpret your data. If a potential relative has already submitted their DNA for testing, you'll want to use the same company for easy comparison. You can transfer your results to another database, either for free or for a fee.
Fathers pass yDNA to their sons (that Y chromosome). Your father, his father, and his father's father have matching yDNA, except for small variations that happen through the generations. While no women are allowed in the yDNA-testing club, a woman can use yDNA for genealogy by having her brother or her uncle tested. Seriously, there can't be a woman in the equation - a grandson won't match his mother's father. Because direct paternal lineage is required, yDNA testing is useful for finding a surname.
DNA in the nucleus of a human cell comes from both parents. Mitochrondrial DNA (mtDNA) is found outside the nucleus and only comes from the mother. Mothers pass mtDNA to all of their children, male and female. Therefore you, your brother, your sister, your mother, your mother's brother, and your maternal grandmother all have identical mtDNA. But your brother's children don't have it; neither do your uncle's children. Men receive it, but they can't pass it on. Before deciding on a test, it helps to draw a family chart and color-code family members who share the same mtDNA.
Autosomal DNA is "the rest" of the DNA in the nucleus. Since it consists of the non-sex chromosomes, there's no way to tell which parent contributed which part. The combination and sequence of parts (nucleotides) get more and more "scrambled" with each generation. So, why test it? Because close relatives, not too many generations distant, have longer sequences of DNA that are identical. Sometimes called the "cousin finder," autosomal DNA is useful for confirming a relationship up to third cousin, and both men and women can be tested.
Genealogical research and oral history made me suspect that my great-grandfather Thomas S. Maness, who disappeared from Randolph County, was really Swain Maness, who lived in Moore County a few years later.
My uncle, a living paternal descendant (Thomas' son's son's son), took a cheek-swab sample to test for yDNA. We compared the results with a potential cousin (Swain's father's brother's son's son). In other words, we climbed up the family tree, then back down to find a living male relative.
The results were disappointing - no match. Yet, the names, ages, description (tall with black hair) and even the occupation (woodcutter) fit. I had no documented evidence about Swain's parentage, just oral history. I wanted to test his (other) descendants, but he had daughters and granddaughters.
Then autosomal DNA testing came along. It can confirm close relations regardless of gender. I found Swain's granddaughter and compared her autosomal DNA with my uncle. It was a close-relative match - Thomas and Swain were the same man!
The results told me that Thomas Swain Maness really was my great-grandfather, but that his father is unknown. He might have been illegitimate (but that's another story).