I always wondered why isn't the Earth shrinking or melting because of the core.
Gravity pulls material towards the centre, whereas heat (the kinetic energy of the particles) causes pressure which enables matter to resist being compressed. The two forces are balanced. If one were greater than the other, the Earth would contract or expand until balance is reached.
The same balance between pressure and gravity keeps stars (which are a million times more massive than the Earth) from collapsing.