Generally, earthquakes are found at plate boundaries where two tectonic plates are moving past each other. Tectonic plates, rigid bodies that move together on the surface of the earth, can be composed of both continental crust and oceanic crust moving together. Continental crust is composed of light (mass) rocks such as granite, while oceanic crust is composed of a heavy, iron-rich rock called basalt. These two very different types of crust can move together as a single plate because they are both part of a single portion of lithosphere, a strong block with crust on the top and stiff hard mantle cooled on the bottom and holding the crust together as a single plate.
These plates are basically the thin brittle shell on the Earth, much like a cracked shell on a soft- boiled egg. Unlike on an egg, these pieces are moving around in response to heat and gravity. As they move past each other they sometimes stick and then release that motion in the form of an earthquake. In fact, this is one of the ways we know the surface of the earth is moving and can define the plates!
There are basically 3 different ways that plates move relative to each other and that all other ways are some combination of those ways. Plates can move away from each other, towards each other, or slide right past each other. Each of these ways creates different kinds of earthquakes. When plates move away from each other it is called an extensional or divergent boundary and the earth breaks into what are called normal faults. The earthquakes generated at these boundaries tend to be at most moderate in size because rocks are generally weak in tension. Because the rocks are weak, they break before they get a chance to store very much energy and therefore the earthquakes are smaller. When plates slide together it is called a convergent boundary and thrust/reverse faults form. These earthquakes tend to be very large because rocks are very strong in compression so when they get stuck it takes a long time and lots of energy to unstuck them. All that energy is released in the form of earthquakes, for example, the August 2007 Peru earthquake or the Christmas 2005 Sumatra earthquake. Finally, when rocks slide past each other it is called a transform boundary. These earthquakes are also very large because rocks build up lots of energy before they are released, for example, the 1906 San Francisco earthquake.
Activities
Like rocks many objects are weaker in tension than in compression and behave differently under tension, compression and shear. As a fun activity take a variety of objects from around the room/school that you have a lot of and can destroy a couple of (paper, straws, pencils, chalk, twigs, leaves, etc) and put one of each at 3 different stations. At station one the students should pull (direct tension, no torque etc) on each object, at station two the students should push the object together, and at station three they should shear it. In all instances they should keep their hands on the desk. As a qualitative observation ask them how hard it was to do each object at each station and then have them write up a discussion about the material properties of each object.