As early as now, familiarize yourself with what to do first and next just as if there's a coming earthquake by tomorrow. I'm talking about an earthquake drill that you can perform together with your family. Funny as it may seem but it would make a huge difference doing so.
Let me give my answer to your question. So, take the first step. Duck and cover the back of your head with both of your hands. Go under a durable table or any furniture when the shaking is ongoing. Now, when the earthquake calms, look on all the directions left, right, up and/or down to see if there's danger around like falling objects or broken glasses that you might get injured from and remember to keep your hands covering the back of your head. It's better to get a broken hands than a broken skull where the brain resides.
As quickly and carefully as possible, run with your family outside your home to a safer area away from tall trees, buildings and/or structures. Stay on that area until assistance has arrived. Prayer is a must.