There are three main types of rocks: igneous, sedimentary, and metamorphic. Igneous rocks form from cooling magma and their crystal size depends on cooling rate. Sedimentary rocks form from compression of particles and sediments into new rocks like sandstone and limestone. Metamorphic rocks form from existing rocks undergoing heat and pressure within the earth, changing their composition and forming rocks like gneiss, marble, and quartzite.