This map shows the boundaries of the Earth's tectonic plates. Most earthquakes and volcanoes occur along plate boundaries.

Image courtesy NASA

Molten material beneath the crust of the earth is called magma. When magma leaves the Earth's crust through volcanic activity, it's called lava. Most volcanoes are on plate boundaries, the edges of the tectonic plates, which are like puzzle pieces that that make up the earth's crust. A few volcanoes, like ones found on Hawaii, are instead located over magma hotspots.

A common misconception is that magma comes from the Earth's molten core. It really comes from the mantle, the layer between the core and the crust. The mantle is solid, but it shifts and becomes fluid due to changes in temperature and pressure. The tectonic plates, which carry continents and ocean floors, rest on top of this mantle. As the plates move, the Earth's continents slowly reorganize themselves.

These plates move at about the same rate that your fingernails grow. Volcanic activity mostly takes place at convergent boundaries, where two plates are pressing together. At divergent boundaries, the plates are moving apart, creating a rift valley. Areas where two plates slide past each other are called transform boundaries. Magma rises up through volcanoes because of the pressure of the colliding plates. It rises up through rift valleys to fill the space that the rift creates. See this graphic for more information on these boundaries.

As lava explodes from volcanoes or seeps up to fill rifts, it can seem inexhaustible. In a way, it is. At convergent plate boundaries, one plate can slide under another plate. The lower, or subducting, plate's crust disappears into the Earth's mantle. There, it gets recycled, becoming part of the mantle. When a volcanic explosion is so massive that the magma underneath is completely depleted, it forms a caldera, or bowl-like depression.

All of this matter circulates on a very large scale, like an enormous pot of thick stew boiling on a stove. It's both a cause and effect of the tiny movements of the tectonic plates that changed the Earth from a world with one continent to a world with several.