Sex chromosomes are derived from ordinary autosomes. The X chromosome is thought to maintain most of its ancestral genes over evolutionary time, whereas its Y counterpart degenerates, owing to its lack of recombination. Genomic analyses of young sex chromosome pairs support this view and have shed light on the evolutionary processes underlying loss of gene function on the Y. Studies of ancestral sex chromosomes, however, have also revealed that the process of sex chromosome evolution can be more dynamic than traditionally appreciated. In particular, ancient Y-chromosomes are characterized not only by a loss of genes relative to the X but also by recurrent gains of individual genes or genomic regions, and they often accumulate genes beneficial to males. Furthermore, X chromosomes are not passive players in this evolutionary process but respond both to their sex-biased transmission and to Y-chromosome degeneration, through feminization and the evolution of dosage compensation.