Investigation of the mechanism of earthquakes