Rocks form through a variety of processes. These processes require energy. Which statement best describes how the energy of Earth's interior contributes to the formation of rocks on its surface?

A.
The energy in the Earth's interior melts rock, creating magma which cools back into rock when it reaches the surface.
B.
The energy in the Earth's interior rises to the surface and melts rocks on the surface, and then this liquid crystallizes back to solid rock when it cools.
C.
The energy in the Earth's interior heats the ocean floor, crystallizing sand into rocks that are brought to shore by ocean waves.
D.
The energy in the Earth's interior produces rocks deep in the Earth, and these rocks are pushed up to the surface during volcanic eruptions.

A. The energy in the Earth's interior melts rock, creating magma which cools back into rock when it reaches the surface.