I thought I'd post a bit of geology for once, after what's happened in Japan. The earth has evolved a fairly simple structure over the last few thousand million years since it formed; as you might expect the heavier stuff has sunk until it ended up in the middle, and the lighter has floated to the top. The core is made up of heavy metals in a molten state, mainly iron and nickel, with some radioactives. Essentially, it acts as a vast nuclear reactor, producing heat, and, as it's molten and presumably circulating, the Earth's magnetic field. This is vital as it protects us from cosmic rays which would otherwise sterilise the Earth's surface.
Above it is a thick layer of rock, the mantle. It's solid - we know that from the way it transmits earthquake waves - but over geological time, it flows. Convection currents carry heat from the core up to the top. Above it are patches of floating scum, made up of lighter material. We call these continents. Between them is the oceanic crust, essentially a thin layer of frozen mantle, with a lot of water on top of it.
The crust is carried along by the currents flowing in the mantle below it; in one place, material is rising, creating new crust - this is happening along the Mid-Atlantic Ridge, for instance, with the ocean getting slightly, but measurably, wider each year - and at other places material is sinking, carrying oceanic crust down with it. Huge areas - plates - of crust grind against each other, producing the jolts we call earthquakes. Japan is at the meeting point of three of these plates, hence the inevitability of earthquakes there. San Francisco is built right on top of the joint between two plates which are moving in opposite directions. There are, as we all realise, plenty of other cities built over major, active, faults.