First of all, you definitely want to come scope this place out for a while before even considering acquiring any form of motorized transport. China is chaotic even by the standards of East Asia!
My personal choices within town are walking if the distance is short, and taking a taxi for longer hauls.
Buses are cheap but usually jammed to a seriously inhumane overload, and I just don't go there. Also, the bus stop signs and the onboard audio announcements will all be very much in Chinese. Usually, if you don't know exactly where you want to go- including sight recognition- buses won't help you much. The routes you'll use most can be learned but it takes time.
If the crowding isn't bad, getting on a bus and riding around the loop of its route can be a cheap and useful way to explore your city. Make sure you know where to get back off.
Beijing and Shanghai have subways; Shanghai's is currently much superior but Beijing is building theirs frantically as the Olympics loom ahead. When you can use these, do- they're nice and they're cheap. Crowding in rush hours can be terrible.
Bicycles are a great way to get around, but biking is really serious stuff here. The bike lanes can be jammed and the riders can be aggressive. Again, it will take some time to get used to this. Also, be aware that biking can be a lot less pleasant when it's raining or when the temperatures are extreme. The good news on bikes is that bikes are amazingly cheap here. You can pick up a decent little basic bike for as little as US $30. The cool little electric bikes are good for lazy legs and hot weather, and they start at around US $150.
Bike licenses, in the cities that require them at all, seem to be had simply for a small payment. I think mine was US $1.20, paid at the bike shop.
Motorbikes and scooters can be a smart way to get around town, but you're now starting to hondle with car traffic in addition to bikes. It's madness and it's dangerous. You have to also figure out obtaining gas and maintenance. I think a license here is something you buy; no idea how much. My advice on this one is to wait until you've lived here a little while. One of our members recently bought a nice-looking little Chinese-made motorcycle for about US $725.
For both bikes and motorcycles, the theft rate here is unimaginable. Buy state-of-the-art security devices and lots of them.
Cars. Sounds good. Don't do it. I could write all day and still never successfully impart to you what the drivers and the traffic are like here. You simply have to see it for yourself.
Getting a driver's license here is a little like getting a pilot's license in the West...it's expensive, and lots of classes and testing and time on a closed track are required. Your license from another country will receive absolutely zero recognition here...you'll have to start from scratch. Many people apparently just bribe their way into a driver's license, which should tell you something about what the drivers in China are really like.
Maintenance is highly dodgy. Parking is often non-existant and very expensive if you can find it at all. Although roads are constantly being built, they are hopelessly outpaced by the explosion in the number of vehicles on them- especially in older cities where there's no place to build more. The city roads are madhouses, while the highways are so heavily regimented that they are no fun to drive on. Gas is expensive, and insurance- as you might well imagine- is worse.
The legal road rules- stop lights and lanes and so on- are at best suggestions. The real rules seem to be socio-cultural, and after all my time here I still have no idea what they are. If you're ever in even a small accident involving a Chinese person- and believe me, you will be- you as the foreigner will not stand a chance. Fenderbender cases are often handled on the spot with one driver making an immediate cash payment to the other- with a traffic cop, and the crowd of locals that will instantly assemble, as judge and jury.
Owning a car here is expensive, frustrating, and dangerous...and all done in Chinese. In all my time here and all the hundreds of foreigners I've known here, I've known precisely ONE person silly enough to drive his own car. In town walk, bike, or taxi. Between towns take the train.