The gravitational force of attraction between
two point masses, M & m
2, separated by a distance 'r' is given by:
F= GMm/r
2
If r=0, then you don't have two masses anymore but one mass. In which cases, gravity would vary with depth of the planet. Read more
here.