Although the ground we walk on seems solid, the Earth's surface is actually made up of huge pieces of flat rock called tectonic plates.
They float on top of a layer of softer, squidgy rock called the mantle.
The plates move very slowly, over millions of years, and where they come together is called a fault.
When the plates rub together, the movement forces waves of energy to come to the Earth's surface.
This causes tremors and shakes - and these are called earthquakes.
They can cause huge amounts of damage, particularly in cities and built-up areas, where buildings, roads and bridges can collapse.
Why is it dangerous after an earthquake?
Earthquakes can cause a lot more damage after the first shock.
They are often followed by aftershocks, causing even more damage to already weakened buildings and roads.
Land, especially hills, can also be damaged by earthquakes and result in devastating landslides and mudslides.
What is an aftershock?
It's basically a smaller earthquake that happens after the main quake, in the same area.
If it's stronger than the first quake, it's renamed as the main earthquake and the original main quake becomes known as a foreshock.
Aftershocks can happen for up to two years after the original earthquake, losing power over time.
The risk of disease
In the chaos that can occur after an earthquake, sometimes electricity and fresh water can be lost. When there's no fresh water, this can lead to the spread of diseases.
Even getting hold of food and basic supplies can be difficult after an earthquake, because roads and other transport links can be destroyed.
The long-term effects of earthquakes can be felt for years afterwards.
From CBBC News