Avoid windows. Get in the basement and under some kind of sturdy protection (heavy table or work bench), or cover yourself with a mattress or sleeping bag. Know where very heavy objects rest on the floor above (pianos, refrigerators, waterbeds, etc.) and do not go under them. They may fall down through a weakened floor and crush you. Head protection, such as a helmet, can boost survival also.
In a house with No basement, a dorm, or an apartment:
Avoid windows. Go to the lowest floor, small center room (bathroom or closet), under a stairwell, or in an interior hallway with no windows. Crouch as low as possible to the floor, facing down, and cover your head with your hands. A bath tub may offer a shell of protection. Even in an interior room, you should cover yourself with some sort of thick padding (mattress, blankets, etc.), to protect against falling debris in case the roof and ceiling fail. A helmet can offer some protection against head injury.
In an office building, hospital, nursing home or skyscraper:
Go directly to an enclosed, windowless area in the center of the building - away from glass and on the lowest floor possible. Then, crouch down and cover your head. Interior stairwells are usually good places to take shelter, and if not crowded, allow you to get to a lowwer level quickly. Stay off the eleveators; you could be trapped in them if the power is lost.