In geology, a rock is any naturally occurring solid mass or aggregate of minerals or mineraloid matter). Rocks are categorized by the minerals included, their chemical composition, and the way in which they are formed. They form the Earths outer solid layer, the crust, and most of its interior, except for the liquid outer core and pockets of magma in the asthenosphere). There are three basic types of rocks: igneous, sedimentary, and metamorphic. Igneous rocks form from molten material, sedimentary rocks form from eroded fragments of other rocks or even from the remains of plants or animals, and metamorphic rocks are sedimentary or igneous rocks that have been transformed by pressure, heat, or chemical action. The types and abundance of minerals in a rock are determined by the manner in which it was formed). The study of rocks involves multiple subdisciplines of geology, including petrology and mineralogy).