An earthquake is the name given to a seismic shock wave caused by the movement of tectonic plates in a planet's crust. Earthquakes are caused by tectonic plates suddenly sliding over or past each other, releasing immense stresses which may have been accumulating between the plates for centuries. The size of an earthquake are measured according to the Richter magnitude scale. (TNG: "The Masterpiece Society")
By the 24th century, seismic regulators were employed on Earth and Risa to control seismic activity in their crusts. In 2373, Pascal Fullerton cited the regulators as being an example of the illusion that Risa was. (TNG: "Time's Arrow"; DS9: "Let He Who Is Without Sin...")
Sometimes, residents of planets other than Earth will refer to earthquakes as landquakes. In 2366, the people of Bre'el IV feared that many such events would affect their planet if their moon impacted on the surface. (TNG: "Deja Q")
An earthquake of about 8 or 8.5 on the Richter scale was measured on Penthara IV after pockets of subterranean carbon dioxide were released by drilling holes with a phaser drill. (TNG: "A Matter of Time")
In 2367, when the impostor styling herself as Ardra visited Ventax II, she used technology to create a series of minor tremors on the planet and thus terrorize the populace. Captain Jean-Luc Picard later used similar technology to prove that what "Ardra" had done was not magic. (TNG: "Devil's Due")
In the Julian Bashir, Secret Agent holoprogram, the character Hippocrates Noah uses lasers beneath Earth's surface to create artificial earthquakes. New York City and Vladivostok were among those struck. (DS9: "Our Man Bashir")
In 2376, the USS Voyager triggered repeated earthquakes while it was trapped in orbit of a high revolution planet. Voyager acted like a third planetary pole, and interfered with the planets natural course of evolution. They used much more iron in their buildings to protect from the earthquakes then you would normally see in a civilization at that stage. Buildings would also have handles throughout them in case of an earthquake. (VOY: "Blink of an Eye")
Background information Edit
In "Time's Arrow, Part II", Doctor Apollinaire said, "There hasn't been an earthquake here [San Francisco] in thirty years." The date of this earthquake, which occurred on the San Andreas Fault, was from a real world source. 
During an earthquake in Los Angeles, Armin Shimerman rushed home while in his Ferengi makeup to make sure his wife, Kitty Swink, and family were unharmed. His makeup "scared the shit out of people", as he remarked later.
The novel A Time for War, A Time for Peace notes a major earthquake struck San Francisco in 2109, suggesting that seismic regulators had not come into use until after that date. An earthquake is also mentioned in an unusual storyline, based within the travels of a young scientist, in the book New Worlds, New Civilizations.