WARNING: Timatic has experienced a major overhaul. There are some inconsistencies, and I'm going to clear them up with my IATA contact, after which this answer will be updated.
The following is taken from Timatic, the database used by airlines (wording occasionally modified by myself to make it more understandable).
The following quotes address the question: who can transit without a visa, and under what conditions?
General restrictions:
Transit without visa (TWOV) is not possible at Fuzhou
(FOC), Huangshan (TXN), Mudanjiang (MDG), Shenzhen (SZX)
and Yanji (YNJ).
For transit without visa (TWOV) purposes, the USA territories of Guam or Northern Mariana Islands do not count as third countries in relation to the USA. Hong Kong, Macau and Taiwan, however, do in relation to China.
Passengers with a
British National (Overseas) passport
must hold a Mainland Travel Permit for Hong
Kong and Macao Residents (Hui Xiang Zheng, credit-card
format) together with their Hong Kong ID
For Hong Kong/Macau/Taiwan passport holders
If Urumqi is the first transit point
Holders of confirmed onward airline tickets, in transit
through Urumqi (URC), for a max. transit time
of 2 hours. Transit incl. multiple stops within China
(People's Rep.), with a total transit time of max. 24 hours,
is permitted.
This does not apply to nationals of nationals of
Afghanistan, Azerbaijan, Hong Kong, Iran, Iraq, Kazakhstan,
Kyrgyzstan, Macau, Malaysia, Nigeria, Oman, Pakistan, Syria,
Saudia Arabia, Sri Lanka, Taiwan, Thailand, Turkey, United Arab
Emirates and Yemen.
In all other cases