The kind of rock that develops from lava and magma also depends on how fast the lava or magma cools. The faster it cools, the smaller will be the crystal structures composing the resulting rocks. If lava falls into water, for instance, it will cool and harden very fast, relatively speaking, forming the glasslike rock called obsidian. Lava that cools a little slower, so that you get a blackish rock that's not glassy but rather fine-grained, like glued-together fine sand, is mostly basalt. If lava hardens into a light-colored, fine-grained rock, then that's usually called felsite.
When magma cools very slowly inside a volcano, crystals have plenty of time to develop and grow, and you get a kind of rocky mush. When the rocky mush solidifies, the resulting rock is often called porphyry
When highly pressurized lava is violently erupted from a volcano, it simultaneously cools and depressurizes. As it loses pressure, many tiny gas bubbles form in it the way gas bubbles do in soda-pops when the tops are removed, lowering the pressure inside the bottles. If the lava cools very fast, as by falling into water, the lava hardens into rock full of bubbles. And the resulting pumice rock is so lightweight that it floats! The rock is also soft enough to cut with a knife, or scrape with a fingernail. The pumace shown above, found floating in the Gulf of Mexico, has a notch cut into it by a pocketknife.
There's another group of igneous rocks, those formed from magma that gathers deep within the earth, often over large areas, and of course that magma cools so slowly that its crystals become quite large. These are called plutonic rocks and the most famous of this group is granite, a close-up shot of which is shown at the right. Notice the rock's lumpiness. The larger white masses are crystals of quartz and orthoclase feldspar, and the dark spots are dark minerals.
Sometimes plutonic rocks are much darker than granite, though the texture is the same, and these are usually known as diorite.