There are three types of rocks: sedimentary, metamorphic, and igneous.
Sedimentary rocks are formed from sand, pebbles, shells, and other fragmented materials. Together, these particles are called sediment. Gradually, the sediment piles up into layers, hardening into rock. Some examples of these rocks are conglomerate and limestone.
Metamorphic rocks are formed under the surface of the earth because of intense heat and pressure. The rocks that result from these processes often have ribbonlike layers and may have shiny crystals. Examples of this rock type include gneiss and marble.
Igneous rocks are formed when magma cools and hardens. Sometimes magma cools inside the earth, and other times it erupts out of volcanos as lava. When the lava cools quickly, no crystals form and the rock looks shiny and glass like. Sometimes gas bubbles are trapped in the rock during the cooling process, leaving tiny holes and spaces in the rock. One example of this is Obsidian.