A Barr body is an inactivated X chromosome found in the nuclei of female mammalian cells, serving as a mechanism of dosage compensation to ensure that females, like males, have one functional copy of the X chromosome in each cell. This inactivation is random in somatic cells and results in a mosaic pattern of gene expression in females, contributing to phenomena such as calico cat fur patterns.