Step-by-step explanation:
The Earth's interior and surface play important roles in the formation of all three types of rocks: igneous, sedimentary, and metamorphic.
Igneous rocks form from the cooling and solidification of magma or lava, which originate from the Earth's interior. Magma is formed from the melting of rocks in the Earth's mantle, and it can rise to the surface and erupt as lava. As the magma or lava cools, it solidifies and forms igneous rocks.
Sedimentary rocks form from the accumulation and cementation of sediment particles that have been transported from their original source by wind, water, or ice. The sediment particles are often derived from the erosion of existing rocks, which can be caused by weathering and tectonic forces.
Metamorphic rocks form from pre-existing rocks that have been subjected to high temperature, pressure, and/or chemical alteration, often due to tectonic forces or hydrothermal fluids. The pre-existing rocks can be any type of rock, including igneous, sedimentary, or metamorphic.