The enamel, the protective outer layer of our teeth, may seem hard as a rock — in fact, it is the hardest tissue on the human body — but it is also porous. That’s how stains accumulate. When we eat a blueberry or have some coffee, our saliva washes away most of the pigment present in these foods and drinks. But tiny amounts penetrate the enamel and lodge. You don’t notice any staining immediately, but over time it makes your teeth more and more yellow and dingy.
Teeth whitening gels, usually made of hydrogen peroxide, break up stains in the enamel in much the same way detergents do with clothing stains. The peroxide gel penetrates the enamel, just as the stains did, and they directly impact the pigment, breaking it up and washing it away.