Hi lybrate-user. Yellowish teeth with black spots can be because of two reasons. Because I hav not seen your case clinically, I will tell you treatment for both.
1. First it may be because of deposits and stains on your teeth.
Treatment for this is scaling. Very normal
procedure for cleaning your teeth and gums.
2. Second, you might be suffering from dental fluorosis
. For this you need to visit a good dentist
the treatment procedure to get a beautiful white smile.