There are three main groups of rocks: igneous, metamorphic and sedimentary. Igneous rocks are formed when minerals cool out from molten liquids generally formed deep below the earth's crust. metamorphic rocks form at high temperatures and pressures, they remain solid during their formation. The rocks form new minerals out of their existing elements in order to retain energetic equilibrium. These are called solid state reactions. Sedimentary rocks form on the surface of the Earth. Sedimentary rocks can be made up of weathered and recycled parts of other rocks -- sandstones and siltstones are a good example of these. However many sedimentary roccks are formed by chemical processes such as successive evaporation of minerals from water.