The three main classifications of rock are igneous, sedimentary and metamorphic. Igneous rocks are produced by volcanic eruptions and form via the solidification of lava. Sedimentary rocks form via the erosion of other rocks. As sediment compacts it will bind to form a sedimentary rock. Metamorphic rocks form via the alteration of other rocks. Alteration takes place via high temperatures and pressures.