Illustration of the rock cycle. This cycle describes the dynamic transitions through geologic time among the three main rock types: sedimentary, metamorphic, and igneous. Igneous rocks are formed when magma (molten rock) from the Earth's interior cools and solidifies. Metamorphic rocks are formed by the heat and pressure of the earths interior. Sedimentary rocks appear when atmospheric agents erode and transport igneous rocks to the seabed, where they are compressed and merged with others into sedimentary rocks.