Teeth stain because of two reasons. The extrinsic stain is superficial and affects only the enamel surface. It is associated with the use of tea, coffee, chewing tobacco or smoking. A dental cleaning and polishing can remove the extrinsic stain to a certain degree, and tooth whitening will remove the extrinsic stain too.
The intrinsic kind of stain is much harder to treat with tooth whitening or bleaching, because they discolor the inner structure of the tooth. The intrinsic stain can be related to fluorosis (too much fluoride when the permanent teeth are being formed), or the use of tetracycline (a kind of antibiotic) at an earlier age.