There are four layers of earth the solid inner core, the liquid outer core, the mantle, the crust. A sudden rapture in the fault can cause an earthquake. A fault is a gap or we can say fracture in the earthâ€™s crust and it can be of any depth or length which varies from place to place.
Scientists believe that mostly earthquake occurs due to the movement of plates and this theory is known as plate tectonics. This says that earthâ€™s outer crust has ten rigid, hard and large plates, twenty small plates. These plates are continuously moving on the hot and soft rock of mantle slowly. This movement causes collision among other plates which further causes stress on the lithosphere. The stress becomes enough to shift or break crust. Now the stress is released and this released energy starts moving from one place to another in the form of waves called seismic waves and these waves shake the earth which we named as earthquake. Sometimes this stress occurs near the centre of plate but mostly it occurs on the edges when two plates collide and goes over or into the plate. So by this different types of earthquake of different magnitudes are caused.
Underwater earthquakes also happen because of the collision of plates and causes the fault line sliding. When a force push the water upwards making a series of small tsunamis which gradually increases till they strike land or shallow water otherwise it continuously keeps on moving in the water and after a certain time period it dies.
Earthquake is measured usually on Richter scale which directly measures the intensity of earthquake because Mercalli scale measures only by description of people.
Earthquake can cause sudden eruption of lava from volcano or waves known as tsunamis. New land mass can also be formed.