In such situation most common ways are:-
1. Drop down onto your hands and knees(before earthquakes you down). This position protects you from falling but allows you to still move if necessary.
2. Cover you head and (and you entire body if possible) under a sturdy table or desk.
3. Hold on to your shelter ( or to your head and neck) until the shaking stops. Be prepared to move with your shelter if the shaking shifts it around. 
1. Do not run outside or to other rooms during shaking.
2. Do not stand in a door way.

1 5 1