X-chromosome inactivation is a crucial process in female mammals where one of the two X chromosomes is randomly silenced to achieve dosage compensation. This ensures that females, like males, have one functional copy of the X chromosome, preventing an overdose of X-linked gene expression.