When a volcano erupts, it spews forth molten rock, or magma. Magma is sometimes also referred to as lava. As magma cools and hardens, it turns into certain types of rocks. Magma that cools on the surface cools much more rapidly than the magma that cools off inside Earth somewhere. This means that two types of igneous rock can form.
Extrusive is one type of igneous rock, and it refers to the rocks that form as magma cools on Earth's surface. Obsidian is a clear example of the properties an extrusive rock has. The rock's surface is glassy and clear, and the the naked eye cannot perceive the crystal structure of the rock. You would have to examine it under a microscope to see the crystal structure. Another common variety is basalt. Pumice is also an extrusive type: the unique texture forms due to gas bubbles trapped in the solidifying rock.
Intrusive rocks are made up of magma that cools within Earth itself. Because they form so deeply, intrusive rocks are more difficult to come by: deposits of intrusive rocks must somehow come to the surface, whether through erosion, digging or a geological shift. They also cool much more slowly than extrusive rocks, and this gives them time to form large crystals in the rock itself. Intrusive rocks have crystalline structures that the naked eye can identify, without needing a microscope. One type of intrusive igneous rock is granite.
Metamorphic rock is a rock that is the result of heat and pressure applied to any kind of rock: igneous, sedimentary or even other metamorphic rocks. This heat or pressure physically or chemically changes the structure, density and appearance of the rock. One type of metamorphic rock is marble, which is formed from limestone.
Dynamic metamorphism is the result of a lot of pressure; sometimes there is heat involved, but that is usually the result of the metamorphism rather than the other way around. This process, while drastically changing the appearance of the rock, generally does not change the components inside the rock. This results in a rock that is texturally different but sometimes not even chemically altered. This commonly occurs at fault lines and in mountains, where a lot of movement has disrupted rock deposits.
Contact metamorphism is the result of a large amount of heat -- in the form of magma -- applied to an already formed rock. This type of rock does not often have the pressure changes associated with other rocks, and therefore when it recools, the rock will have a finer interior texture. This occurs primarily in shallow levels of Earth's crust, where a large temperature difference exists between the rock that has formed and the magma.
Regional metamorphism is a type of metamorphism that occurs over a relatively large area, and it is associated with the upheaval that occurs when mountains are formed. Sometimes this occurs at a fault. Both pressure and medium to high levels of heat are involved, although neither of those factors are quite so significant to this type as the amount of rock that is involved.