Nearly all human complex traits and disease phenotypes exhibit some degree of sex differences, including differences in prevalence, age of onset, severity or disease progression. Until recently, the underlying genetic mechanisms of such sex differences have been largely unexplored. Advances in genomic technologies and analytical approaches are now enabling a deeper investigation into the effect of sex on human health traits. In this Review, we discuss recent insights into the genetic models and mechanisms that lead to sex differences in complex traits. This knowledge is critical for developing deeper insight into the fundamental biology of sex differences and disease processes, thus facilitating precision medicine.