In humans, sexual dimorphism is associated with the presence of two X chromosomes in the female, whereas males possess only one X and a small and largely degenerate Y chromosome. How do men cope with having only a single X chromosome given that virtually all other chromosomal monosomies are lethal? Ironically, or even typically many might say, women and more generally female mammals contribute most to the job by shutting down one of their two X chromosomes at random. This phenomenon, called X-inactivation, was originally described some 50 years ago by Mary Lyon and has captivated an increasing number of scientists ever since. The fascination arose in part from the realisation that the inactive X corresponded to a dense heterochromatin mass called the "Barr body" whose number varied with the number of Xs within the nucleus and from the many intellectual questions that this raised: How does the cell count the X chromosomes in the nucleus and inactivate all Xs except one? What kind of molecular mechanisms are able to trigger such a profound, chromosome-wide metamorphosis? When is X-inactivation initiated? How is it transmitted to daughter cells and how is it reset during gametogenesis? This review retraces some of the crucial findings, which have led to our current understanding of a biological process that was initially considered as an exception completely distinct from conventional regulatory systems but is now viewed as a paradigm "par excellence" for epigenetic regulation.