What makes genes dominant/recessive?

Say I have a gene for blue eyes and brown eyes. The brown eye gene is dominant so I have brown eyes.* But what determines that brown eyes are dominant? Does the proteins for the genes beat up the blue eye proteins and stuff them in a garbage can? Does the cell turn off the blue eye gene and if so why? Are more brown eye proteins produced overwhelming the blue eye proteins?
*I know eye color is more complicated than this. I just wanted an illustrative example.

Strictly it is traits, not genes that are dominant or recessive. It seems like a nit-pick, but suppose (to simplify your example – real eye colour is more complex than this) that there was a gene that produced a protein pigment that turned your eyes brown, when they would naturally be blue otherwise. Then people who had even a single copy of this gene would express the “brown eyes” trait, but people with no copies would have the “blue eyes” trait.

From a phenotype perspective, “brown eyes” would be dominant – if one of your parents has two copies of the brown eyes gene, you would be guaranteed to have it, too. If both of your parents don’t have the gene, you are guaranteed not to have it. But there is no “blue eye gene” that produces “blue eye proteins”, because the “blue eyed” trait is determined by the absence of the brown eye protein.

It all boils down to the biochemistry of the proteins involved. Remember that (generally speaking) genes code for proteins. Different alleles (technically, you have a dominant and recessive allele for a specific gene) simply code for different versions of the same protein. The difference can be so small as to be undetectable, or huge, like if you have a premature stop codon, so that you essentially get no protein at all.

The dominant/recessive thing applies only to heterozygotes. If you have two different alleles for a specific gene in the same individual, you get the phenotype of the dominant allele. To understand why, you need to understand what the proteins do to create the trait, and how the different versions of the proteins do their job and interact with each other.

The simplest example is if one allele is defective and doesn’t do anything. Let’s say the protein is responsible for making the pigment in the eye. It may be the case that having one working allele gives enough protein to do the job. In this case, the defective allele is recessive. Or it may be that you need so much of the protein that having only one working allele isn’t enough. In that case, the defective allele is dominant.

The point is, you can’t really predict it in advance. You have to look at a heterozygote to tell. There are lots of other ways alleles can interact, too. Sometimes one version of the protein binds to the target molecule but can’t let go, and this prevents the other version of the protein from even getting to the target. Sometimes the interaction with regulatory proteins changes. Perhaps one variant can’t be phosphorylated properly, which may make it more or less active. Etc, etc.

It depends a bit on the function of the protein encoded by the gene.

In one example, the CFTR gene contains the instructions to build a channel to regulate the flow of chloride ions through the cell membrane. You can think of this as an automated door, just as you might find at the supermarket.

There are literally hundreds of variants to this gene, but thinks of them broadly - “normal” and “broken”. If you have one normal working door at your supermarket then people can go in and out just fine… so long as you aren’t trying to force too many people through the door at the same time.

Likewise, if you only have one normal copy of the CFTR gene and the other copy is broken, then you have some ion channels that function normally and some that are broken. So long as the normal channels have the capacity to move enough chloride at the right times then it is no problem. Thus the 1 normal gene is dominant over the broken variant. **

But if you have a supermarket with no doors you have a problem just as a cell with no working chloride channels has a problem. That occurs when you have two broken copies of the gene. If this case that results in the disease known as cystic fibrosis.

** As an aside, people with only one normal CFTR gene (persons heterozygous for the CF trait) have a reduced capacity to move chloride ions in extreme circumstances. This is thought to actually be a survival advantage in areas where cholera is endemic. These heterozygotes are not as susceptible to dehydration because they cannot move so much chloride so fast as people with two normal genes.

As leahcim says, it’s traits. One example which shows the direct link to protein production is blood types, I’ll talk about Rh because it’s simpler than ABO (and the explanation is simplified, I’m not getting into details of gene expression or of how exactly blood type proteins “work”).

You are Rh+ if your blood cells have the “Rhesus factor protein”, Rh- if they don’t. An “Rh+ gene” produces Rhesus factor protein; an “Rh- gene” does not. So someone with both Rh- genes will have no Rhesus protein and will be Rh-, but as soon as you have one Rh+ you get some Rhesus protein and are therefore Rh+.