If you are an important visitor or on a western tour in China, you may never have to worry about getting around a Chinese city because you will be chauffeured. For everyone else, there is walking, biking, public buses, private buses, motorized carts, legal taxis, and illegal taxis. Foreigners are only allowed to rent and drive cars in very restricted areas of Beijing and Shanghai.
Walking and biking are excellent options in good weather. Some of my favorite moments were experienced while observing Chinese life from the sidewalk. Don't let the smog or chaotic looking streets deter you. There are actual rules governing how all the traffic on the streets interacts with pedestrians, but they take time to learn. For your first few forays into the city, be careful and walk across the street just behind a Chinese person.
Biking is also very pleasant, but be sure you test your brakes before trying to bike around town. It is also important to lock your bike whenever you leave it alone since bike thieves are very common. At markets and popular areas of town, there are often areas where you can pay a small fee for a person to watch your bike and ensure no one tries to pick the lock while you are away.
Public and private bus lines offer a much cheaper alternative to hiring a taxi or motor cart. Many buses are packed with people, but the number of people on the bus depends on the city, route, and time of day. (Be sure to secure your valuables in a crowded bus!) THe main drawback to using buses is that it is often difficult to decipher where the bus is going unless you speak excellent Chinese or are very good with Chinese characters. Many cities sell maps with bus routes printed on them, but use Chinese characters. Be careful about using buses listed in guide books, since route numbers may have changed. If you live in a city along enough, it becomes easier to use that city's bus system and it is exceptionally easy if someone accompanies you the first time you try to get to a destination.
Private buses will often run along a public bus route and charge the same amount as the public buses, though some charge more. These private buses are often more like large vans and there is usually both a driver and a person who calls to potential riders, opens the side door, and collects money. Private buses also run routes that public buses will not take. They may run long windy routes into the countryside or around town. It is much easier to ride private buses if you can read Chinese characters since they usually display a sign in the front window.
Legal taxis are the only legal for-hire transportation service. You can use them for a quick 5 minute trip, or rent them for the day (usually at a bargained rate). Legal taxis have distinctive markings and use a meter. It make take the driver a half block to turn on the meter, but make sure they do! It is always easier to get them to turn on the meter than to argue about the price, later. Fares are cheap when compared to US prices. The 5km trip from downtown to my school cost around $1.50, and it is so much more relaxing than riding the bus!
Taxis swarm everywhere and are much more common than privately owned cars. You can flag a taxi down with your hand, though there are streets where it is illegal for taxis to stop and you may have to walk to a smaller side street. It is possible to use your guidebook's Chinese characters to tell the driver where to go. Some drivers may offer to drive you to other sights around the city (for a price, of course). The best way to avoid these offers is to claim you have other activities to do that day or simply tap your watch.
Illegal taxis may be unmarked cars or vans or legal taxis running on days they are supposed to take off. Random illegal vehicles can often be bargained, though legal taxis running on their off days often still use their meters. Illegal taxis are more dangerous than registered taxis and I would not advise riding in an illegal taxi unless you know what the cost should be, bargain the rate before the trip, and ensure they travel the correct route.
A fun, dirty, and bumpy way to get around is in a motorized box. Basically, it is the front of a motorcycle on a small box that 4 people can squeeze into. Some carts have doors and plush seats, others are just a tarp on a frame. You always bargain the price of the ride before you begin. This is a cheaper option than taxis, if slower and louder, but I found it exhilarating and fun.