That's right, a clear pattern -- correct! Now you see the locations of the plate boundaries, shown by the yellow lines, and it becomes obvious that more than 95% of all earthquakes are located along the boundaries between the plates, which are composed of lithosphere, the
outer rigid shell of the earth.
The plates are composed of the crust and the upper 50 kilometers or so of the mantle. This outer shell is on average between 80 to 100 kilometers thick beneath the oceans, but is much thinner at the mid-ocean ridge where the oceanic lithosphere and sea floor of the abyssal plains are created by sea floor spreading. The lithosphere under the continents (continental lithosphere) is much thicker than under the oceans, reaching a thickness of 125 kilometers to 200 kilometers, although its base is poorly defined by seismological analyses beneath many continents.
Earthquakes occur where/when stresses build up at the boundary as one piece of lithosphere moves past another piece of lithosphere over time -- until the rocks along the boundary fracture, resulting in rapid, differential movement between the two pieces of the lithosphere -- this rapid movement, which occurs over a few tens of seconds sends out seismic waves taht radiate around the world.