Earth's crust is composed of iron, oxygen, silicon and magnesium. Other elements are also present in small amounts, including sulfur, nickel, copper and calcium. Earth's crust ranges from 3 to 44 miles deep, and it is almost the only source humans have for obtaining minerals.
Early in its history, Earth underwent a process of differentiation. During this process, the heavy minerals suspended in the still-molten Earth sank to the core, where they remain, subjected to intense pressure and heat.
Above this layer, Earth has a mantle that extends about 1,800 miles from the outer core to just beneath the crust. Convection within this mantle layer is responsible for the movement of the Earth's crustal plates. The lighter elements that went into Earth's formation remained at or near the surface, and formed both the continental crust and the denser, heavier sea floor.
Sea floor tends to be driven under, or subducted, where it meets a continental plate, and sinks to a region just under the crust called the melt zone. Here, water contained in the rock convects heat into the block of sea floor and causes it to melt. The resulting magma is relatively light and carries minerals to the surface in volcanic eruptions.