Minerals and rocks are natural, non-living materials. Minerals are the building blocks of rocks and give rocks their properties. There are three main types of rocks: igneous, sedimentary, and metamorphic. Igneous rocks form from cooled lava or magma underground or at the Earth's surface. Sedimentary rocks form from compressed and cemented sediments over millions of years. Metamorphic rocks were originally igneous or sedimentary rocks that were changed by heat and pressure within the Earth.