The technology works like this: DNA is chemically extracted from bone or other human remains and run through a sequencer. Powerful computers then read the various DNA sequences that emerge and discard all those not related to the problem at hand, such as viruses or bacteria, which are often the vast majority of the sample. The human DNA -- or sometimes other species, if that is what is being studied -- is then compared to databases of human genomes. It is rare for a nearly complete genome to be discovered; a genome is considered "high quality" if it is more than 5% complete. But a 5% sample of the 3 billion base pairs in the human genome is usually enough for high quality statistics. The differences between different human populations are small, on the order of 0.1%. Again, with 3 billion base pairs to work with the differences still stand out.
But I want to emphasize that all of this statistical, and it depends on assumptions made about which mutations represent important forking points in our genealogies and so on. I think this is great science but it is still very new and some of what I write below may turn out to be wrong. Most of it may turn out to be oversimplified.
I would summarize the main discoveries of paleogenetics so far as follows:
1) Humans interbred with other hominid species such as Neanderthals and Denisovans. Outside of Africa, humans are 1% to 1.5% Neanderthal. Certain key genes, such as those that help Tibetans survive at high altitude, may have come from other species. Neanderthals and Denisovans also interbred with each other.
2) Native Americans almost all descend from a single migration of people from Asia that took place on the order of 15,000 years ago.
3) Agriculture was spread into Europe by a mass migration of farmers from Anatolia, who genetically replaced most of the native foragers. Those farmers contributed the largest share of the genes of modern Europeans. The data for Asia is not as good but so far it looks like the major ethnic groups of East Asia, including Han Chinese, Koreans, and Japanese, are descended from early farmers who spread out from the Yangtze Valley.
4) Modern races formed from the great shake-up spawned by the discovery and spread of agriculture; in the Mesolithic the racial composition of Eurasia was completely different. Around 15,000 years ago the Neolithic farmers of Anatolia and the Neolithic farmers of Iran were as different from each other as Chinese and Welsh are today.
5) In the Bronze Age, the people of the Black Sea steppes spread very widely across Eurasia, making major contributions to the gene pool from Ireland to India. These people presumably spread the Indo-European languages. The details of this process are still not certain, but the fact of population disruptions between 3300 and 2500 BCE is clear. There is a simple statistical test that can show if one population could be the product of two others, and it shows that medieval Europeans could not be descended just from native foragers and Middle Eastern farmers; a third major contribution is needed.
6) European history after the Bronze Age continued to see migration on a large scale. The Bell Beaker invasion of Britain and Ireland around 2200 BCE may have resulted in the replacement of 80% of the population.
7) Genetic studies in Rome suggest that the population was changed by a migrants from the eastern Mediterranean in the late Republic and early empire, then changed again in the late empire by migrants from north of the Alps.
8) Historians have been arguing about how many Anglo-Saxons came to Britain for 200 years, with no result. Was there a mass migration, or just a coup by elite warriors? But now genetics suggest that about 25% of the genes in Britain come from Anglo-Saxon invaders. Even if they were genetically more successful than the natives, this still requires tens of thousands of migrants, and probably more than a hundred thousand.
My mind is still blown every time I think about these discoveries, which have opened a huge new window into the past.