If you can afford to go to the dentist to have a dental cleaning then that would be your best and most effective option.
But you can also get rid of yellow and brown spots from your teeth by using some baking soda and water to make a baking soda toothpaste.
Brush your teeth with the baking soda toothpaste at least 2 times per day everyday for at least a few months and the brown and yellow spots should be gone from your teeth.