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.