* Igneous rocks: Form from the cooling and solidification of molten rock (magma or lava).
* Sedimentary rocks: Form from the accumulation and cementation of sediments, which are fragments of other rocks, minerals, or organic matter.
* Metamorphic rocks: Form when existing rocks (igneous, sedimentary, or even other metamorphic rocks) are transformed by heat, pressure, or chemical reactions.
While mineralogy and texture can provide clues about a rock's classification, the origin is the defining factor.