What magnitude measures
Magnitude estimates the energy released at the source of an earthquake. The old Richter scale has largely been replaced by the moment magnitude scale (Mw), which works better for large quakes, but the public still calls it 'the Richter scale'.
Why it's logarithmic
Each whole number up the scale means about 10 times more ground shaking and roughly 32 times more energy. A M6 releases ~32x the energy of a M5, and a M7 about 1,000x a M5. That is why great quakes are in a different league entirely.
Magnitude vs intensity
Magnitude is a single number for the whole quake. Intensity (the Mercalli scale) describes how strongly it was felt at a given place, which depends on distance, depth and local ground.