In those species in which sex is determined by the presence of the Y or W chromosome rather than the diploidy of the X or Z, a Barr body is the inactive X chromosome in a female cell, or the inactive Z in a male (Lyon, 2003), rendered inactive in a process called Lyonization. The Lyon hypothesis states that in cells with multiple X chromosomes, all but one is inactivated during mammalian embryogenesis. This happens early in embryonic development at random in mammals, (Brown, 1997) except in marsupials and in some extra-embryonic tissues of some placental mammals, in which the father's X chromosome is always deactivated (Lee, 2003). Barr bodies are named after their discoverer, Murray Barr.

The inactivation state of chromosomes is passed on to daughter cells during mitosis. (Hall et al., 2003) Since random chromosomes are selected for inactivation early in embryonic development, this results in different regions of the adult body having different chromosomes inactivated. This can be significant if different alleles of a gene are present on the different chromosomes; in some regions of the body one allele will be active, and in other regions the other will. This is what results in the coloration pattern of female calico cats; pigmentation genes on the X chromosome are activated in different patches of skin based on which chromosome is condensed in those regions. (Alberts et al., 2002)

The Barr body chromosome is generally considered to be inert, but in fact a small number of genes remain active and expressed in some species. These genes are generally those which are present on the other sex chromosome (Y or W). (Lyon, 2003)

Mammalian X-chromosome inactivation is initiated from the X inactivation centre or Xic, usually found near the centromere. (Rougeulle et al., 2003) The centre contains twelve genes, seven of which code for proteins, five for untranslated RNAs, of which only two are known to play an active role in the X inactivation process, Xist and Tsix. (Rougeulle et al., 2003) The centre also appears to be important in chromosome counting: ensuring that random inactivation only takes place when two X-chromosomes are present. The provision of an extra artificial Xic in early embryogenisis can induce inactivation of the single X found in male cells. (Rougeulle et al., 2003)

The roles of Xist and Tsix appear to be antagonistic. The loss of Tsix expression on the future inactive X chromosome results in an increase in levels of Xist around the Xic. Meanwhile, on the future active X Tsix levels are maintained; thus the levels of Xist remain low. (Lee et al, 1999) This shift allows Xist to begin coating the future inactive chromosome, spreading out from the Xic. (Lyon, 2003) In non-random inactivation this choice appears to be fixed and current evidence suggests that the maternally inherited gene may be imprinted. (Brown, 1997)

It is thought that this constitutes the mechanism of choice, and allows downstream processes to establish the compact state of the Barr body. These changes include histone modifications, such as histone H3 methylation (Heard et al., 2001) and histone H2A ubiquitination, (de Napoles et al., 2004) as well as direct modification of the DNA itself, via the methylation of CpG sites. (Chadwick et al., 2003) These changes help inactivate gene expression on the inactive X-chromosome and to bring about its compaction to form the Barr body.