The crust is the thin outermost layer of the Earth. It consists of solid rock which makes up the continents and the ocean floors. In the Plate Tectonics Theory, scientists believe that the crust together with the upper part of the mantle is divided into pieces called plates. These plates are believed to move slowly over the layer of magma in the mantle. Scientists think that plates move because of convection currents in the mantle.
Earthquakes occur mainly along plate boundaries.
In the Indian Ocean, just off the islands of Sumatra and Java in Indonesia, there is an oceanic trench called the Java Trench. It was formed by the subduction of the Indo-Australian Plate beneath the Eurasian Plate. The large number of volcanoes in this area is also the result of subduction. As these two plates move towards each other, friction between the moving plates caused stress to build up. When the energy which has been stored up in the rocks is suddenly released as shock waves, earthquake occurs.