The statement that best describes how the energy of Earth's interior contributes to the formation of rocks on its surface is:
C. The energy in the Earth's interior melts rock, creating magma which cools back into rock when it reaches the surface.
This statement accurately represents the process of magma formation due to heat from the Earth's interior, and the subsequent cooling and crystallization of magma into solid rock as it reaches the surface.