The plates consist of an outer
layer of the Earth, the lithosphere, which is cool enough to behave as a
more or less rigid shell. Occasionally the hot asthenosphere of the Earth
finds a weak place in the lithosphere to rise buoyantly as a plume, or hotspot.
Only lithosphere has the strength and the brittle behavior to fracture in an
earthquake.
The map above locates earthquakes around the globe. They are not evenly
distributed; the boundaries between the plates grind against each other,
producing most earthquakes. So the lines of earthquakes help define the plates:

(from the USGS)
In cross section, the Earth releases its internal heat by convecting, or
boiling much like a pot of pudding on the stove. Hot asthenospheric mantle rises
to the surface and spreads laterally, transporting oceans and continents as on a
slow conveyor belt. The speed of this motion is a few centimeters per year,
about as fast as your fingernails grow. The new lithosphere, created at the
ocean spreading centers, cools as it ages and eventually becomes dense enough to
sink back into the mantle. The subducted crust releases water to form volcanic
island chains above, and after a few hundred million years will be heated and
recycled back to the spreading centers.

Earthquake occurrence in different plate tectonic settings:
The map
below of Earth's solid surface shows many of the features caused by plate
tectonics. The oceanic ridges are the asthenospheric spreading centers, creating
new oceanic crust. Subduction zones appear as deep oceanic trenches. Most of the
continental mountain belts occur where plates are pressing against one another.
The white squares locate examples given here of the different tectonic and
earthquake environments. 
(topography from NOAA)
There are three main plate
tectonic environments: extensional, transform, and compressional. Plate
boundaries in different localities are subject to different inter-plate
stresses, producing these three types of earthquakes. Each type has its own
special hazards.
At spreading ridges, or similar extensional boundaries, earthquakes
are shallow, aligned strictly along the axis of spreading, and show an
extensional mechanism. Earthquakes in extensional environments tend to be
smaller than magnitude 8. (Click here
for an explanation of earthquake magnitude).
A close-up topographic picture of the Juan de Fuca spreading ridge, offshore
of the Pacific Northwest, shows the turned-up edges of the spreading center. As
crust moves away from the ridge it cools and sinks. The lateral offsets in the
ridge are joined by transform faults.

(from RIDGE, LDEO/Columbia Univ.)
A satellite view of the Sinai shows two arms of the Red Sea spreading ridge,
exposed on land.

(from NASA)
(from the USGS)
At transforms, earthquakes are shallow, running as deep as 25 km;
mechanisms indicate strike-slip motion. Transforms tend to have earthquakes
smaller than magnitude 8.5.
The San Andreas fault in California is a nearby example of a transform,
separating the Pacific from the North American plate. At transforms the plates
mostly slide past each other laterally, producing less sinking or lifing of the
ground than extensional or compressional environments. The yellow dots below
locate earthquakes along strands of this fault system in the San Francisco Bay
area.

(from NASA/JSC; topography from NOAA)
At compressional boundaries, earthquakes are found in several settings
ranging from the very near surface to several hundred kilometers depth, since
the coldness of the subducting plate permits brittle failure down to as much as
700 km. Compressional boundaries host Earth's largest quakes, with some events
on subduction zones in Alaska and Chile having exceeded magnitude 9.
This oblique orbital view looking east over Indonesia shows the clouded tops
of the chain of large volcanoes. The topography below shows the Indian plate
,
streaked by hotspot traces and healed transforms, subducting at the Javan
Trench.