The most superficial layer of the Earth, the Lithosphere, is divided into smaller parts called tectonic plates, which move slowly, causing a continuous process of pressure and deformation to the large rocky masses. When the pressure is too great and surpasses the rock's limit of resistance, th rock is torn apart, originating a geologic fault, and, then, an earthquake ensues. Part of the accumulated energy is, then, set free in the form of elastic waves, which propagate in all directions, causing the land to vibrate intensely. This process is the cause for most of the earthquakes. Usually, the the rocks' rupture only happens deep down below. During weaker seisms usually the earth only dislocates some centimeters along the geologic fault. Therefore, the rock's rupture is the mechanism by which the earthquake is produced.
Almost all of the earthquakes have a tectonic origin, that is, they are related to a geologic fault. However, earthquakes can also be caused by volcanic activities or men's activities themselves, which, in this case, is called induced seisms. As significant examples, we have the seisms produced by nuclear explosions or generated by the creation of large hidroelectric reservoirs.