The Richter Scale
The magnitude of most earthquakes is measured on the Richter scale, invented by Charles F. Richter in 1934. The Richter magnitude is calculated from the amplitude of the largest seismic wave recorded for the earthquake, no matter what type of wave was the strongest.
The Richter magnitudes are based on a logarithmic scale (base 10). What this means is that for each whole number you go up on the Richter scale, the amplitude of the ground motion recorded by a seismograph goes up ten times. Using this scale, a magnitude 5 earthquake would result in ten times the level of ground shaking as a magnitude 4 earthquake (and 32 times as much energy would be released). To give you an idea how these numbers can add up, think of it in terms of the energy released by explosives: a magnitude 1 seismic wave releases as much energy as blowing up 6 ounces of TNT. A magnitude 8 earthquake releases as much energy as detonating 6 million tons of TNT. Pretty impressive, huh? Fortunately, most of the earthquakes that occur each year are magnitude 2.5 or less, too small to be felt by most people.
The Richter magnitude scale can be used to desribe earthquakes so small that they are expressed in negative numbers. The scale also has no upper limit, so it can describe earthquakes of unimaginable and (so far) unexperienced intensity, such as magnitude 10.0 and beyond.
Although Richter originally proposed this way of measuring an earthquake's "size," he only used a certain type of seismograph and measured shallow earthquakes in Southern California. Scientists have now made other "magnitude" scales, all calibrated to Richter's original method, to use a variety of seismographs and measure the depths of earthquakes of all sizes.
Here's a table describing the magnitudes of earthquakes, their effects, and the estimated number of those earthquakes that occur each year.
The Mercalli Scale
Another way to measure the strength of an earthquake is to use the Mercalli scale. Invented by Giuseppe Mercalli in 1902, this scale uses the observations of the people who experienced the earthquake to estimate its intensity.
The Mercalli scale isn't considered as scientific as the Richter scale, though. Some witnesses of the earthquake might exaggerate just how bad things were during the earthquake and you may not find two witnesses who agree on what happened; everybody will say something different. The amount of damage caused by the earthquake may not accurately record how strong it was either.