Rock is the primary component of the Earth's crust. Although soil, sand and other natural materials are similar to rocks, they are not actually rocks and are classified as derivatives of rocks. Minerals are necessary to form nearly all types of rock, and most include more than one mineral. Metals are also found in many rock types.
There are three classes of rock and they are all formed in different ways. Igneous rock is created by the cooling of a molten mixture of minerals called magma. Magma is found below the earth's crust. When the magma cools below the Earth's surface, the rocks that are formed are called intrusive, and when it cools above the Earth's surface, they are extrusive rocks.
Sedimentary rock is created from loose material, such as sand, pebbles, mud and even pieces of organic matter. Sediments are loose materials that are moved from one place to another. Sediment becomes rock after millions of years of pressure and chemical action.
The final type of rock is metamorphic rock, which forms under the Earth's surface through the alteration of existing sedimentary or igneous rocks. These alterations can be caused by pressure, chemical reactions, movement of the Earth's crust, heat and pressure.