Practice is the key to protecting yourself during an earthquake

If you’re inside a building and the ground beneath it begins to shake, what should you do? Stand in a doorway? Run outside? If you’re inside a building and the ground beneath it begins to shake, what should you do?