How to design earthquake resistant structures?

With increasing number of earthquakes happening around the world, it has become necessary for engineers to build earthquake resistant structures. Let us look at how to design them.