Earthquakes happen because of the Earth's geology. Geology is the study of the Earth and its crust. The earth is made up of layers - the crust, the mantle, the outer core and the inner core.
The plates sit against each other and they're uneven. When the earth settles and cools down, the plates rub against each other. This movement can cause an earthquake. We talked about this like heating up a hot pocket in the microwave oven - the inside gets hot and it inflates, then the air goes out and the crust can break.
Earthquakes can kill people by buildings or roads collapsing. The most dangerous thing is glass from broken windows, so you want to be careful.
More people are hurt from fires that are started by earthquakes. The way things catch on fire is because of natural gas. Almost every home has natural gas. It's carried in pipes throughout the city. If the pipe breaks in the city or in your house the gas gets out and that's how fires start. You can't see the gas, but you can smell it. It smells sort of like gasoline. It is really dangerous. An adult in your family needs to know how to turn off the gas in your house.
You can find out more about the earth's layers at cnn.