This is a classic freshman physics thought problem. Assuming spherical symmetry, including uniform density, the gravitational force acting on a body inside a shaft drilled through the Earth’s center depends only on the mass of the inner sphere below the body at a given depth, with zero contribution from the spherical shell of mass above the body at that depth.
When you work it out, it turns out that the force of attraction decreases linearly from surface to center. This makes the system mathematically equivalent to a body hanging from a spring according to Hooke’s Law. It will oscillate with simple harmonic motion (displacement vs. time forming a perfect sine wave) ignoring air resistance & other friction. If you allow friction, the harmonic motion will dampen until the body comes to rest in equilibrium at the center.
If you fell into the hole at the surface, you would speed up until you raced past the center, then slow down until you stopped just at the surface at the other end of the shaft. Then the process would repeat indefinitely in the absence of friction.
Note that the linear attractive force with distance from the center contrasts with the inverse-square law above the surface.
This was already answered correctly by others, but I wanted to help clarify.