Is there a cavity under my filling or sth else

I just had a filling for a cavity today (it is pretty small). When I look, I see there is a black spot under the filling (not on top). The spot is the location of the cavity I had on that tooth. I want to know if my dentist just put the filling on top of it or is it some kinda of treatment? There is a picture down below.

Possible infection on cavity. When bacteria enters the tooth it causes irritation. If it gets worse consult your Dentist.