To try and simplify matters,the answer is basically this:~
When two sections of the Earth's crust collide, one slab of crust can be forced back down into the deeper regions of the Earth, as shown in this diagram. This process is called subduction. The slab that is forced back into the Earth usually undergoes melting when the edges get to a depth which is hot enough. (A temperature hot enough to melt lithosphere is about a thousand degrees!). This process is called "subduction".
Melted crust rises back towards the surface where it helps make volcanoes and islands. Thus the formation of some volcanoes, mountains, and islands is connected to the process of subduction and continental drift. The melted lithosphere also releases gases of the atmosphere which had become trapped in the ground. Thus subduction of the lithosphere contributes to recycling of the atmosphere!
http://johnvanderploe...amchat/subduction.jpg
So the tectonic plates that make up the Earth's crust are always moving,and are in pressure against each other.The one that is weaker in strength loses and suffers "subduction"(see above)
The heat that melts the losing plate comes from the Earth's molten and extremely redhot core.It is basically still cooling from when the Earth was first formed millions upon millions of years ago.When the plate that is being pushed down meets the Earths core heat it melts.
Don't worry that the core will cool soon.It has been estimated that it cools at a rate of 5 degrees,every 100,00 years!
So nowhere that we can see receeds or shrinks,the plates that do so are deep down in the crust of the Earth.The plates melt and then are reborn as larva in a volcanic erruption.