The study of how genetic variation is distributed within and among populations, and how it changes over time.