If you are in your car. Stop driving away from overpasses, trees and buildings. Stay in your car until the quake has passes. Afterwards, avoid driving over bridges which may have been compromised during the quake.
If you are in a building, drop, cover and hold your position. If you are able, get underneath a door jam and then drop, cover, and hold.
After the quake, cautiously go outside and meet up with your family. Beware of aftershocks, they can be just as dangerous as the first hit.
If you are in a collapsed building, call out to others that should be near you. Only dig yourself out if you can easily push away debri. If you force something, it may have been holding weight above you, and you could cause something to cave in on you.
Plug up all drains and turn off your water supply after the earthquake. Water supplies may no longer be clean, and sewage can backflow up your drains.
If you are outside, stay there. Move away from trees, buildings, and power lines.