The degree of genetic diversity differs greatly among species and across genomic loci within genomes. The wide ranges in genetic diversity have important implications, including for evolution, conservation and management of wild and domesticated species. In this Review, the authors discuss how genome-scale sequencing strategies are providing insight into the varied determinants of genetic variation both among species and across genomic regions. Genetic polymorphism varies among species and within genomes, and has important implications for the evolution and conservation of species. The determinants of this variation have been poorly understood, but population genomic data from a wide range of organisms now make it possible to delineate the underlying evolutionary processes, notably how variation in the effective population size (Ne) governs genetic diversity. Comparative population genomics is on its way to providing a solution to 'Lewontin's paradox' — the discrepancy between the many orders of magnitude of variation in population size and the much narrower distribution of diversity levels. It seems that linked selection plays an important part both in the overall genetic diversity of a species and in the variation in diversity within the genome. Genetic diversity also seems to be predictable from the life history of a species.