While people may tell you outrageous stories about using toilets in China, they have come a long way in the past decade. China's major tourist sights almost all have new toilets and an attendant who practically lives there to keep them clean.
That said, you can come across some primitive situations. You should carry tissues with you as free toilet paper is not the norm outside five star hotels. When you are on the road if you can ask your guide to keep a lookout for good toilets then they can usually find you a good option.
Chinese toilets are normally the squat style, which admittedly take some getting used to but on the other hand you don't touch anything. Hotels all have western toilets.
You will want to know how to recognize which toilet is for your sex and how to read the characters "public toilet". You don't have to be able to read Chinese - it is pattern recognition. Stare at the male and female a while, or copy them repeatedly on paper. Carry them with you and look at them while waiting in a line.
"Gong ce" literally translates as "public toilet". You might see it on a sign post at an intersection or the side of a building. There are plenty of public toilets in Beijing if you keep your eyes open for signs like the one below.
Toilets in China vary greatly, which is probably why the government has started rating them with stars and handing out awards. I've never seen any awarded less than three stars — one and two star toilets don't seem to get labeled.