Its caused by bacteria, sometimes if alot of the sides of the tooth has been removed you can see grey sides to the teeth otherwise it will just be seen under the filling. Your dentist should also know this really

Phil