Igneous rocks form through the cooling and solidification of magma or lava, with their composition depending on the temperature, pressure, and material changes. They are classified into four main groups based on silica content: felsic, intermediate, mafic, and ultramafic, with each group exhibiting specific mineral compositions. Intrusive igneous rocks crystallize below the surface, resulting in larger crystals, while extrusive rocks cool quickly on the surface.