While the human microbiome's structure and function have been extensively studied, its within-species genetic diversity is less well understood. However, genetic mutations in the microbiome can confer biomedically relevant traits, such as the ability to extract nutrients from food, metabolize drugs, evade antibiotics, and communicate with the host immune system. The population genetic processes by which these traits evolve are complex, in part due to interacting ecological and evolutionary forces in the microbiome. Advances in metagenomic sequencing, coupled with bioinformatics tools and population genetic models, facilitate quantification of microbiome genetic variation and inferences about how this diversity arises, evolves, and correlates with traits of both microbes and hosts. In this review, we explore the population genetic forces (mutation, recombination, drift, and selection) that shape microbiome genetic diversity within and between hosts, as well as efforts towards predictive models that leverage microbiome genetics.