Igneous rocks form through the cooling and solidification of magma or lava, making them one of the three main rock types alongside sedimentary and metamorphic rocks. They are primarily classified into two categories: intrusive (plutonic) rocks, which cool slowly beneath the Earth's surface, and extrusive (volcanic) rocks, which cool rapidly on the surface.