Rocks are categorized into three distinct types based on their method of formation. The three types are igneous, sedimentary, and metamorphic. Early in Earth's history, all rock was igneous, having formed from the cooling of melt on the surface. An igneous rock is simply a rock that has solidified from magma or lava upon cooling.