We're told that internal parts of Planet Earth is made up of extremely dense material. We're also told that the earth is very gradually cooling down. (The moon has already done so, to a greater extent) So what happens when something cools? It shrinks.
Deep below the surface, but between the core and the earth's surface there is are layers which have some malleability: magna- molten rock!
As the earth has shrunk, cracks have occured along its surface crust (fault lines) As shrinkage occurs the tectonic 'plates' which make up this crust push against each other as the world slowly shrinks, fighting for the an ever decreasing space. So they push against each other, bend, snap, slide over and under one another. Here and there fissures occur through which the hot magna rises to the surface.
Mountain ranges are not as immovable and static as they appear to be. Errosion might where them down, and yet at the same time they might be being built up by the pushing together of plates scores, even hundreds of miles away.
You need remember that the fault lines run right around the earth, splitting here and there, but there are far more and deeper fissures below the oceans, and far more volcanoes below the oceans than there are above its surface.
Earthquake and volcanic activity never stops. And I suspect never will stop until the earth has become a dormant cinder with no more heat in it. But perhaps long before that, it will have been swallowed up by the by then exploding sun.