(Igneous, Sedimentary, Metamorphic)
Igneous rocks form by the cooling & crystallization of hot, molten rock (magma & lava). If this happens at or near the land surface, or on the seafloor, they are extrusive igneous rocks. If this happens deep underground, they are intrusive igneous rocks.
Most igneous rocks have a crystalline texture, but some are clastic, vesicular, frothy, or glassy.
Sedimentary rocks form by the solidification of loose sediments. Loose sediments become hard rocks by the processes of deposition, burial, compaction, dewatering, and cementation.
If the sediments are derived from weathering & erosion of any previously existing rocks, you've got siliciclastic sedimentary rocks.
If the sediments are derived from once-living organisms (plants, animals, micro-organisms), you've got biogenic sedimentary rocks.
If the sediments formed by inorganic chemical means, you've got a chemical sedimentary rock.
Most sedimentary rocks have clastic textures, but some are crystalline.
Metamorphic rocks result from intense alteration of any previously existing rocks by heat and/or pressure and/or chemical change. This can happen as a result of regional metamorphism (large-scale tectonic events, such as continental collision or subduction), burial metamorphism (super-deep burial), contact metamorphism (by the heat & chemicals from nearby magma or lava), hydrothermal metamorphism (by superheated groundwater), shear metamorphism (in or near a fault zone), or shock metamorphism (by an impact event).
Many metamorphic rocks have a foliated texture, but some are crystalline or glassy.