Earthquakes have to do with the movement of tectonic plates. Tectonic plates gradually move independently of one another, but the points where they meet aren’t just constantly in motion alongside each other. Rather, friction holds the edges in place while the pressure builds up and up, until finally it’s released in one large movement of the earth (an earthquake). You can also have earthquakes in the middle of a tectonic plate, which is the kind we get in Australia. The reason is something about our tectonic plate being squeezed on all sides. While the pressure is more likely to erupt into an earthquake on the edges of the plates (e.g. in New Zealand or Indonesia), the constant inward pressure can also result in “cracking” on the “top crust” of the plate.
A number of factors are relevant for determining how intensely an earthquake might be felt in a given area. These include, obviously, the strength of the earthquake (the seismic magnitude), the distance of an area from the epicentre of the quake, and the depth beneath the ground at which the quake occurs (generally, shallower quakes result in more shaking at ground level). This experience of how a quake feels is called the “seismic intensity”, and is measurable on scales like the modified Mercalli intensity scale.