Enamel the first layer of tooth surface, is actually semi-translucent, or clear. The layer underneath the enamel, known as dentin, is typically yellow, but may be gray, brown or black. This hue is what is seen penetrating through the enamel. In order to whiten the dentin, a peroxide solution is placed on the enamel. This process opens the pores of the enamel, allowing the solution to reach the layer of dentin. The solution will then begin to lighten the dentin, resulting in the appearance of whiter teeth
For further reading click here.