Inside the Earth, g increases linearly from 0 at the center to a maximum value at the surface. Outside the Earth, g decreases with the square of the distance from the center. Therefore, g is maximum at the surface of the Earth.