"It" is a pronoun for an earthquake.
Pronouns are basically words used when referring to a noun. In this case, "earthquake" is a noun. We use the pronoun "it" when referring to an earthquake since earthquakes are gender less, and therefore the pronouns "he" or "she" would be inappropriate when referring to an earthquake.