If you were to drill a hole through the center of the earth the result might seem a little counter intuitive.
Gravity decreases with distance, away from the earth, ie in outer space, and it also decreases as you travel toward the center of the earth.
The reason is that the force of gravity on an object will only come from the inner layers (relative to position of the object).
The volume of the sphere with radius of the distance from the center will affect you, not any outside layers, since the outside layers will cancel forces.
The part of the outside layer near to you will be closer with less mass and the part farther away will have more mass (proportional inversely to square of distance).