Rocks formed by the cooling and solidification of molten or partly molten material, magma at depth or lava at the surface, classified by texture and where the melt solidified, following the intrusive, extrusive and pyroclastic divisions used throughout standard igneous petrology and the USGS rock-type glossary. Includes plutonic rocks that crystallized slowly underground (granite, gabbro, diorite, syenite, anorthosite, peridotite, dunite, norite, monzonite, kimberlite), volcanic rocks that cooled quickly at or near the surface (basalt, andesite, rhyolite, dacite, trachyte, obsidian, komatiite), a hypabyssal rock that crystallized in a shallow intrusion (diabase) and a coarse-grained rock formed from the last fluid fraction of a crystallizing magma (pegmatite), pyroclastic rocks built from fragmented volcanic ejecta (tuff, scoria, pumice), and a rock classed by its texture across several of these settings (porphyry). Belongs here: any material whose origin is the cooling of magma or lava, whatever its depth, grain size or eruptive violence. Does not belong here: rock formed by the surface accumulation of sediment (Sedimentary Rocks) or by the alteration of an existing rock under heat and pressure without full melting (Metamorphic Rocks).