Minerals are naturally occurring solid substances with specific chemical compositions and atomic structures, while rocks are aggregates of one or more minerals. There are three main types of rocks: sedimentary rocks, which form from the accumulation of sediment; igneous rocks, which form from the cooling of magma; and metamorphic rocks, which form from the alteration of existing rocks by heat and pressure in the earth's crust. Common examples of each rock type are listed.