Igneous rocks form from the solidification and crystallization of molten rock. The texture of an igneous rock depends on the size, shape, and arrangement of its mineral crystals, which is determined by the rock's cooling rate. Extrusive igneous rocks cool and solidify quickly at the Earth's surface, resulting in fine-grained or glassy textures, while intrusive igneous rocks cool slowly beneath the surface, forming coarse-grained textures.