One problem with skyscrapers and earthquakes is finding good soil. The building must be built on level ground. If the soil falls the building will collapse. With this being said, foundation must be good. Another thing to be aware of is where it is built. A big skyscraper cant be build in weak soil because it will sink into the ground. If the soil moves it will become unstable and the building could collapse. to prevent this you can build the foundation until it hits the rock.
The next reason is that the compression structure is may be weak. Columns need to be able to support the weight of the building. Concrete columns with rebar are most effective. Some buildings have load bearing walls. Take this out and the whole building will collapse. Other buildings don't use load bearing walls and instead use steel columns. These have a better chance of survival then load bearing walls because the steel can absorb the earthquakes power.
Sources: http://imaginationstationtoledo.org/educator/activities/can-you-build-an-earthquake-proof-building, https://christnerinc.com/uploads/wysiwyg/hcd-five-reasons-buildings-fail-during-earthquakes-jeff-white.pdf