The main streets of Chinese cities are divided into a middle section for cars, side sections for bicycles and motor scooters, and broad pavements for pedestrians. A good idea in theory, but this neat division is only a suggestion and no one pays it much attention. Cars often drive along the sidewalk and park. People walk in the street. Bikes and scooters go everywhere. Crossing a chaotic street is a challenge. Traffic signals at pedestrian crosswalks have a walking green man and a red hand, just as in the US, but they are treated as only interesting Christmas decorations by drivers. Even a striped crosswalk will not protect you. In practice, the pedestrian has no right-of-way—ever.
Cars are not the worst problem. The bikes and scooters come at you from any direction. They are silent and have no lights. The streets are usually dark and unlit.
Despite this, there are not as many maimed and crippled Chinese than one would expect. There must be rules—but they are unwritten and understood only by the locals.
The best advise for foreign pedestrians is to cross with them. I would sidle up to other waiting Chinese, press shoulder-to-shoulder, and watch them, not the traffic. I got some puzzled looks, but when they stepped out, I moved in lock-step right with them. And I survived to tell you about it.
Note: 11/14/2016. I stand corrected. All I said above pertains only to Beijing. I recently discovered this photo of Guilin, arguably the pleasantest city in the world, showing everyone in their correct lanes. I should have realized driving habits and courtesies vary by location, just as they do in America. Beijing is in the north and the drivers resemble those in New York City. Guilin is a small city far to the south on the Li River, and the people are much more polite. Perhaps it is a north–south thing, or a big city–small city thing, but the difference is noticeable here and in China. (The photo is on the bridge over the Li River that bisects the city.)