Ever wondered why some areas get earthquakes and others don’t? The answer to that is also the reason that kids trying to “dig a hole to the other side of the world” may find the center of the earth a good bit hotter than expected. The deeper one gets, the more pressure there is on the rock from above, and that pressure causes heat, and eventually everything melts.
The center of the earth is a molten sea of lava held in place by gravity and maintained as lava by the immense pressure of having the Earth’s mantle and crust above it. Above this sea of lava there are different layers with different compositions and properties. The further up you go from the Earth’s core, the less liquid and more solid the rock becomes. Mankind lives on the very top layer (called the crust), chunks of rock floating on this sea of lava. These chunks of rock are not connected to each other, they form plates that shift around. The places where these plates connect are the danger zones for earthquakes. The properties of the layers between us and the molten core slow down the motion of the plates, but do not stop them. These shifting plates are what cause earthquakes.
As these plates shift around they slide by each other. Sometimes, one of the places gets caught on another plate due to an irregularity is the plates structure. There are many ways the plates death with this, but they are all based on one thing. The plates just keep pushing against each other. The stress eventually snaps, and the plate pushes past whatever was stopping it. All the energy that was being exerted to push against the obstruction is released, and that causes and earthquake.
This is the basic cause of an earthquake, but is not a 100 percent accurate way to predict where they will hit. All of the plates have areas on the plate that can handle this released energy better than others, which makes it possible from an earthquake of sufficient magnitude to spread away from the actual connection between the plates (which is called a fault line) into an area of instability on the plate itself. It is also important to note that many fault lines are underwater, and an earthquake at one of these fault lines, would cause a tsunami.