Earthquakes occur all the time all over the world, both along plate edges and along faults. Most earthquakes occur along the edge of the oceanic and continental plates. The earth's crust (the outer layer of the planet) is made up of several pieces, called plates. The "Ring of Fire", also called the Circum-Pacific belt, is the zone of earthquakes surrounding the Pacific Ocean- about 90% of the world's earthquakes occur there.
Divergent plate boundaries because the separating of the tectonic plates allows for the lava to push its way through the rift and escape to Earth's surface.