Rocks are formed through three main processes - igneous, sedimentary, and metamorphic. Igneous rocks form when melted rock reaches the surface or cools underground, sedimentary rocks form from compressed layers of sediment, and metamorphic rocks form from existing rocks that are changed by heat and pressure. Rocks are created through volcanic eruptions, weathering and erosion of existing rocks, or from pressure and temperature transforming solid rock over time.