Igneous rocks form from the cooling and solidification of magma or lava. There are three main types based on formation environment: volcanic, hypabyssal, and plutonic. Volcanic rocks form from lava at the Earth's surface and are typically fine-grained. Plutonic rocks form deep underground and are usually coarse-grained due to slow cooling. Texture depends on factors like cooling rate and mineral composition, ranging from glassy to phaneritic. Igneous rocks are classified based on their mineralogy and chemistry, particularly their silica content.