Sexual reproduction relies on the ability to "mix" the DNA from two parents to produce offspring. For scientists who use DNA to trace ancestry, this mixing poses a challenge by making it difficult to match the DNA of two individuals, even if the individuals are closely related.* As it happens, there are two genetic loopholes that allow scientists to circumvent this limitation. One -- the passing of an unaltered Y chromosome -- occurs with male offspring; the other -- the passing of a mother's mitochondrial DNA -- occurs with all offspring. These loopholes allow scientists to trace both paternal and maternal lineages.
Your DNA is comprised of 23 pairs of chromosomes, or 46 chromosomes in all. Half of these 46 chromosomes you inherited from your mother, and the other half you inherited from your father. If you're a female, all of these chromosomes are mixtures: The ones you inherited from your mother are a mixture of her parents' DNA, and the ones you inherited from your father are a mixture of his parents' DNA. If you're a male, 45 of the chromosomes are mixtures, and one chromosome -- the Y chromosome, which you inherited from your father -- is not a mixture at all. Instead it is a nearly exact copy of your father's Y chromosome, which is, in turn, a nearly exact copy of his father's Y chromosome. (If you're a female, you inherited an X chromosome from your father in place of the Y chromosome.)
The similarity between the father-son Y chromosomes continues from one generation to the next. For males, if you follow your family tree back along the paternal line -- from you, to your dad, to his dad, to his dad's dad, and so on -- you'd find that the DNA of all the Y chromosomes had the same genetic sequences, with the exception of changes caused by random genetic mutations. This is what allows scientists to trace ancestry along a paternal line. The more closely related the family tie of two individuals, the more similar their DNA sequences will be, since these mutations accumulate over the generations. A father and son should have the most similar DNA sequences of all.
The 23 pairs of chromosomes just discussed make up what is called nuclear DNA. To trace ancestry along the maternal line, scientists use another type of DNA: mitochondrial DNA (mtDNA). Outside the nucleus, but still within the cell, are anywhere from 200 to 2,000 mitochondria. Mitochondria are tiny structures that help the cell in a number of ways, including producing the energy that the cell needs. Every mitochondrion includes an identical loop of DNA about 16,000 base pairs long. By contrast, each cell contains only a single set of nuclear DNA, which is made up of 3,000,000,000 base pairs. Whenever an egg cell is fertilized, nuclear chromosomes from a sperm cell enter the egg and, together with the egg's nuclear DNA, form the DNA for the new individual. The mtDNA from the sperm cell, however, is left behind, outside of the egg cell. This is why only the mother's mtDNA carries on to subsequent generations.
Unlike nuclear DNA (with the exception of the Y chromosome), mtDNA is passed on, with no change, from mother to offspring. The father's mtDNA, by contrast, is destined to die off; no trace of its genes will pass on to subsequent generations (unless a woman who inherited the same mtDNA -- his sister, for example -- has children of her own). This is what allows scientists to trace ancestry along a maternal line.
* with the exception of identical twins, whose DNA does match