system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: in genetics, how do the concepts of dominance and recessiveness translate into biochemical terms?

In a heterozygote, the dominant allele will be expressed in preference to the recessive allele. How does this work biochemically in the cell? Would it be that only the dominant allele is transcribed, or simply that the dominant allele is transcribed more than the recessive allele? 

Additionally, after reading about X-inactivation, I am confused as to how this process can exist alongside sex-linked diseases. For instance, if I understand correctly, the gene for Hemophilia is located on the X-chromosome, and because females have two X chromosomes, the existence of a recessive disease-causing allele on one X-chromosome can be masked by the existence of a dominant allele on the other X-chromosome. However, if X-inactivation is a random process, then wouldn't some cells end up expressing the recessive allele while others end up expressing the dominant allele? What effect would this have on the organism as a whole, in terms of the pathology of Hemophilia and other sex-linked diseases? 

Thank you! I'm not confident as to whether I understand these concepts correctly, so it would be great if someone could correct me if I'm wrong.
gpt
Dominant vs Recessive: Suppose your cell needs to make 30 things called "A" to do some function and that each working allele 'B' produces 50 of A, while each non-working allele 'b' produces no A. So, a cell with BB or Bb alleles will still be able to make enough A to do its function, while a cell with bb alleles will not make enough A.  
  
Using haemophilia as an X-linked example: haemophilia is caused when cells don't have the working gene needed to produce a clotting factor, causing blood to be thin while bleeding. X-inactivation causes half of female cells to have the working gene, and half to have the non-functional gene. However, the amount of clotting factor produced by the functional cells is still enough to clot the blood, so hemophilia is not seen in females.  
  
This is a VERY basic explanation and there are exceptions but this is a general rule. Let me know if you have questions.