how to make teeth cavity free and white?

black lines in teeth especially on grinding surfaces and some cavities,with generallised yellowishness…help.