Check out this site run by the California Division of Mines and Geology.
Earthquakes occur when two pieces of the earth snap past each other along a fault.
That fault is actually a crack that extends deep into the earth. It depends on how you measure size. Magnitude wasn't used as a measure of size until the last 100 years or so. Check out this site run by the U.S. Geological Survey. Check out the information on another part of the site run by the U.S. Geological Survey.