Formation
The broadest classification system groups rocks by how they were formed. Igneous rocks, such as obsidean, basalt and pumice, are created by cooled magma. Sedimentary rocks, such as sandstone, limestone and conglomerates, form when other rocks or pieces of rock are consolidated into a single stone. Metamorphic rocks, such as marble and slate, form deep under the earth's surface, where intense heat and pressure change the structure of existing rocks.
Subformation
Some types of rock may be further subdivided according to the details of how they formed. For instance, granite and obsidian are both igneous rocks. However, granite is a platonic, or intrusive, rock, which forms under the earth's crust; while obsidian is a volcanic, or extrusive, rock that forms on the surface. Sedimentary rocks, such as sandstone, which form when dry rock granules are compressed, are clastic rocks; while those that are formed by deposits of dissolved minerals, such as limestone, are chemical sedimentary rocks.
Texture
The next broadest subdivision categorizes rocks according to their texture, or the size of their particles. The most common categories are phaneritic, or large-grained, and aphanitic, or small-grained rocks. Igneous, sedimentary and metamorphic rocks are all subclassified into these categories. Additionally, igneous rocks may be classified as glassy, porphyritic (having large and small grains) or vesicular (having large air pockets).
Alignment
Geologists classify metamorphic rocks according to how the layers of rock are aligned. Those that have parallel layers and split easily into sheets are foliated rocks, such as slate and schist. Those that have a random arrangement, such as marble, are nonfoliated.
Composition
One of the last major levels of classification categorizes rocks according to their mineral composition. Unlike rocks, minerals have a definite chemical composition and crystalline structure. They occur as natural compounds within the earth's crust and mantle and combine in different proportions to form rocks. Quartz, feldspar, muscovite, gypsum, halite and calcite are common components. For instance, granite is mostly feldspar, quartz and mica. Limestone is predominently calcite.