Toothpaste marketed as whitening contains either the bleaching agent hydrogen peroxide (H2O2 - hydrogen peroxide) or an abrasive - or both.
In the EU, OTC products cannot contain more than 0.1% hydrogen peroxide and this concentration is too low to whiten teeth (read more about whitening and OTC whiteners). Therefore, you can't say that whitening toothpaste is whitening. The abrasive in the toothpaste acts much like sandpaper and polishes the surface of the tooth. The abrasive does indeed effectively remove coatings, some of which can be discoloring, but if the discoloration is deeper in the enamel, the abrasive will not result in whiter teeth.
In other words, toothpaste that whitens teeth on purpose has no effect on discoloration embedded in the tooth - on the contrary, it is inappropriate to grind the enamel daily by using toothpaste with a high abrasive content.
If you are unhappy with the color of your teeth, it's a good idea to ask your dentist about your teeth whitening options. Firstly, the dentist will be able to suggest the right treatment and inform you about the pros, cons and possible side effects.

