Sedimentary rocks are formed by the deposition of material on the earth's surface or in bodies of water, and make up around 8% of the earth's crust by volume. Intrusive igneous rocks form underground from magma that cools and solidifies within the surrounding country rock, resulting in coarse-grained textures. Metamorphic rocks comprise a large part of the earth's crust and form under high temperatures and pressures, being classified by their textures and mineral assemblages.