The outer layer of a tooth is called the enamel. The color of natural teeth is created by the reflection and scattering of light off the enamel, combined with the color of the dentine under it. Your genes affect the thickness and smoothness of the enamel. Thinner enamel allows more of the color of the dentin to show through. Having smoother or rougher enamel also affects the reflection of light and therefore the color.
Every day, a thin coating forms on the enamel and picks up stains. Tooth enamel also contains pores that can hold stains.
Tooth whitening initiates lightening teeth and helping in getting rid of these kind of stains and discoloration. Whitening is not a one-time procedure. You have to constantly undergo whitening treatment one in a while if you want to maintain the lightened teeth.