As usual (or as necessary) we were taught the textbook version of something... in this case dosage compensation. Yes, it is true that in mammals one of the X chromosomes is randomly inactivated to form a mass of heterochromatin known as a Barr body... but is this the end of the story?
Dosage compensation is a necessity in any organism with morphologically different sex chromosomes. If no compensation occurred, then the homogametic sex, e.g. XX females in humans, would show twice as much X-linked genes expression than males. It just happens that inactivation of one of the X chromosomes is only one of the possible strategies.
In Drosophila there will be a two-fold increase in X-linked expression in males. This is possible through a protein complex called MSL (male-specific lethal) which includes enzymes involved in acetylation and phosphorylation of specific histone amino acids (characteristic marks of active chromatin). The complex is targetted to the X chromosome through hundreds of binding sites with variable affinities for the complex.
C.elegans shows a strategy more similar to that of mammals. However, instead of inactivating completely one of the Xs, it will partially repress both Xs on hermaphrodites (XX). It also uses a protein complex, DCC (dosage compensation complex), but its characteristics are quite different from that of MSL- it includes no enzymes, and no non-coding RNAs. Due to its homology and shared components with the 13S condensin complex, responsible for chromatin compaction during meiosis and mitosis, DCC is thought to repress transcription by positively coiling DNA.
In mammals we already know what happens... However there is no primary protein complex- it is a non-coding RNA, Xist, that will spread from XIC, a 1 Mb region in the X, and coat one of the X chromosomes. It will then allegedly recruit other proteins that mediate the epigenetic changes characteristic of the inactive Barr body. How the choice is made is not known, but a recent study suggests that the two XIC (one in each X chromosomes in females) can physically pair, which may be involved in determining which of the two is inactivated.
To finish off, and off course after reiterating that the story is even more complicated than that, it is important to say that even if we consider only mammals, not everything has been told to us. In fact, X inactivation does not always occur at random. It happens that in certain mammals, namely in mice, at the early embryo stages there is imprinted X inactivation of the paternal X only. This is, however, reverted in the cells of the inner cell mass, which will then undergo normal random inactivation... Of course we can't be told everything in lectures... but is interesting nevertheless to find these things out later on!
Ng K., Pullirsch D., Leeb M., Wutz A. (2007). Xist and the order of silencing, EMBO Reports, 8. pp 34-49
Straub T., Becker P. (2007).Dosage compensation: the beginning and end of generalization, Nature Reviews Genetics, 8. pp 47-57