Tectonic plates move because they are floating on top of the liquid mantle. The mantle itself moves due to convection currents: hot rock rises, gives off some heat, then falls. This creates vast swirls of moving liquid rock under the crust of the earth, which jostles the plates of crust on top.
Nobody really knows the details of the convection cells. They're hard to study, since they're so deep.
But earthquakes are probably less about changes in the underlying convection, and more like sudden responses to strain. Plate tectonics occurs over periods of hundreds of thousands to millions of years. It doesn't all proceed evenly. Bits get stuck against each other, and when they give, you get a sudden jolt of a few tens of feet. It's quite tiny, in the plate tectonic scheme of things, but it's enough to knock buildings over.