The Earth is made of layers of different kinds and phases of rock. The ground we stand on, called the lithosphere, is solid, but underneath this layer is a fluid layer of molten rock called the asthenosphere.
The asthenosphere is solid because, in short, it has a higher pressure and is at a higher temperature than the lithosphere. As you travel from the outer layer of the earth toward the center, the pressure increases because there is more rock pressing down on you with gravitational force. The temperature also increases as you get closer to the center of the Earth. So, in the asthenosphere, the temperature and pressure are hot enough to make the rock liquid. This is shown in the phase graph below.
The core of the Earth is constantly giving off heat which is radiated out through the layers. So, the part of the asthenosphere closest to the center of the Earth gets heated up. Once that rock is heated, it wants to cool down again. To do this, it moves further away from the center and expands. This rock moves toward the surface of the earth and cools, but there is more rock underneath it getting heated and rising as well. The rock needs to move out of the way for the newly heated rock, so it moves out of the way and eventually sinks back closer to the center of the Earth. This movement of rock creates convection currents in the asthenosphere.
The outer layer of the earth is broken into tectonic plates. Because of the convection currents in the asthenosphere below them, the plates move. This movement causes geographic structures and events such as mountains, volcanoes, and earthquakes. The plate motion isn't a constant, smooth motion. Due to friction between the different plates, they move in sudden jumps that we call earthquakes. The jumps happen once the force on the plates from the convection currents becomes stronger than the force of friction.
The jump from the plate movement sends out waves in all directions. P and S waves travel through the Earth away from the source. P waves are faster and longitudinal and S waves are slower and transversal. Love and Rayleigh waves travel along the surface and are the ones that cause the damage we see. Love waves are transversal whereas Rayleigh waves are both transversal and longitudinal.
Scientists use seismographs to detect the P and S waves. As the P and S waves reach the surface and disperse, they cause the ground to shake which the seismograph picks up. When they were first used, seismographs were a simple weight, paper, and pen system. Today, they are electronic, using computers and circuits instead of pen and paper to detect the motion of the waves. Since the S waves travel at about 60% the speed of P waves, scientists can determine how far the waves have travelled using the time difference between the S and P waves. Each seismograph, however, cannot determine what direction the waves came from. To find the place of origin of the earthquake, data from several different seismographs needs to be combined.
Earthquakes are ranked on the amount of energy they released. One of the most common scales is the Richter scale. It is a logarithmic scale from 1 to 10, 1 being the weakest and 10 the strongest. Most earthquakes are too weak to be felt, from 1 to 4 on the Richter scale, and are only detected on the seismographs.
In summary, the earthquakes are caused by convection currents and plate motion, are felt due to waves, and are detected using seismographs.