This entry is written by someone who has actually experienced this phenomenon. It'd be wise to remember the advice given below, because if you end up in an earthquake you may not have the time to consult h2g2.
First, it is better to experience an earthquake of any magnitude as close to ground level as possible. I was in Taichung, Taiwan, on Sept. 21, 1999, for the 7.3 Richter Scale earthquake at 1:47am. I was also in Orange County, California, when we experienced the Northridge earthquake several years ago. That was quite a good one with a lot of shaking. The Taiwan quake was quite a bit more massive, magnified by the fact that I was staying on the 22nd floor of the Grand Formosa Hotel.
When an earthquake happens it can either be a 'roller' when the ground seems to roll with the motion of the various movements underground, or it can be the other type where the ground suddenly juts up at the epicenter. The latter produces a much more sudden and violent action, and you don't want that.
Anyway, where was I? Oh, 22 floors up. There's nothing quite like being awakened from a sound sleep by your wife jumping on you screaming, 'What's happening?!' You realise it's a huge earthquake and you're both about to go skydiving with a massive concrete and steel parachute. But you tell your wife, 'Oh, it's just a little earthquake, my dear. Nothing to worry about.'
The building then starts swaying back and forth, sending everything in the room crashing to the ground. Lamps break, vases of flowers shatter, your TV falls to the floor, tiling on the wall of the bathroom pops off and breaks on the floor. In the middle of the swaying to and fro there is usually a sudden jerk in the motion. The building continues to sway. The movement of the earth ceases but the building still continues to sway. The building will finally settle and shortly afterwards the pictures on the walls will stop moving too.
At this point it is safe to get up - checking the immediate area for broken glass - and put on your shoes, which you have conveniently left nearby. Now that you have your shoes on, you can safely retrieve your wife's shoes. Note to wives: socks are not required at this point, especially if they are in a drawer across the room and you have not yet slipped into your shoes, so graciously retrieved by said husband.
At this point, caution: earthquakes are followed by other earthquakes, referred to as 'aftershocks'. Aftershocks usually follow closely on the heels of the main earthquake, and by 'closely' I mean 'within minutes', so be prepared to jump back onto your bed to ride out the aftershocks. There will probably be more than one.
Now, one of the chief differences between earthquakes when you are low to the ground and earthquakes when you are high above the ground is stairs. You will have to descend many flights of stairs in a tall building because the elevators will not be working after the earthquake. Power may have been knocked out or the hotel staff may shut them down until they can be checked for safety. If the elevators work, it is probably not a good idea to use them.
While descending the stairs, keep in mind the above cautionary note on aftershocks. Aftershocks will probably occur while you are trying to descend and exit the building. When you are outside on the ground, you will find that it's dark, because there is no power to the streetlights and buildings. I also found that it was cold because the time was two in the morning. Hopefully you've remembered a jacket and the emergency flashlight the hotel stored at the back of your closet. And did you remember to grab the bottled water out of your in-room refrigerator? That may come in handy, too, since it may be some time before anyone decides to come to the aid of the tourists in town. The local emergency people are checking their own families first, then their friends' families, and then they will be reporting to work if they are able. So you will be outside your hotel until it has been checked for safety, sometime within the next 12 hours.
That's the hi-rise earthquake experience in a nutshell. When you are in a building low to the ground, such as your house, you wake up when the earthquake starts and say something intelligent, such as "Must be an earthquake." You lie there watching things shake back and forth to see what falls over and will need to be picked up. The shaking stops, you roll over and go back to sleep.
Unless your house has collapsed, of course.