This diagram shows where the three layers of earth are, along with where magma is inside of earth.
http://science-at-home.org/more-about-volcanoes/

How Do Volcanoes Form?

The earth is made up of three layers. The most inner layer is the core, the middle layer is the mantle, and the outer layer is the crust. Volcanoes begin in the mantle, where hot, pasty rock called magma forms. Sometimes, magma gushes out of weak spots in the crust, but magma usually rises and comes out of the top opening of the volcano. Each time a volcano erupts, the volcano grows bigger.