Actually there are three kinds of earthquake. This kinds of earthquake are commonly base on the factor and geological area where the earthquakes happen. These three kinds of earthquake are tectonic, volcanic and explosion.
Tectonic earthquakes is most common one. This kind of earthquake happens while earth's crust rocks break because of the geological strength created by moving of the earth's plates.
Volcanic earthquakes happen exactly with volcanic activity.Volcanic earthquakes are when the volcano produces acidic lava, which drys quickly, when it drys quickly it blocks the top ofthe volcano. This make no more magma can escape. Pressure starts to build up and eventually the acidic lava can no longer stand the pressure. So the volcano is free to explode, the pressure is released so fast that an earthquake is caused. A volcanic earthquake is usually kept within 10-20 miles of the volcano.
Explosion earthquakes are the result of the collapse earthquakes that are small earthquakes occurring in underground mines and caverns.
Partly taken from: