How does the acceleration of gravity change in space bodies when moving from the surface to their center?

If the space body is homogeneous, then the acceleration of gravity decreases with depth; in the center of the body g = 0. A similar situation is assumed for the terrestrial planets. If the density increases with depth, then the acceleration of gravity will have a maximum at some depth; at the center of the object g = 0. This situation takes place on the Sun. The maximum value of gravitational acceleration for the Sun is observed at a distance of 0.217 of the radius of the star from the center.

Remember: The process of learning a person lasts a lifetime. The value of the same knowledge for different people may be different, it is determined by their individual characteristics and needs. Therefore, knowledge is always needed at any age and position.