Modelling a planet as built of many thin, uniform concentric spherical shells, the shell theorem shows that at a depth d below the surface, only the mass of the smaller INNER sphere of radius (R−d) contributes any net gravitational pull -- the outer shell (of thickness d) surrounding that point contributes exactly zero, since the point lies inside it. Assuming uniform density, this leads to the strikingly simple, EXACTLY linear relation gd=g(1−Rd), valid all the way from the surface (d=0, gd=g) down to the very centre (d=R, gd=0).
The result that g is exactly zero at a planet's centre is a direct and important consequence of the shell theorem's cancellation, not a special assumption -- a body at the centre is pulled equally in every direction by the surrounding mass, and all these pulls cancel by symmetry, exactly as for a point anywhere inside a uniform hollow shell. Combining the depth relation (linear, for r<R) with the altitude relation (inverse-square, for r>R) into a single graph of g versus distance from the centre shows both pieces meeting at exactly r=R, the point of MAXIMUM gravity, with g falling off on either side whether one goes up or down from the surface.