Qufu has around half-a-dozen bus routes. Useful ones to know are No.1 which passes by the Temple of Confucius, the Kong Family Mansion and the Cemetery of Confucius. No.2 heads east along the main road so that you can visit the Mausoleum of Shao Hao, about 3-4km from the town. They cost RMB1 per journey.
In order to preserve the hometown of Confucius, the Beijing-Shanghai railway bypasses 15km from Qufu to Yanzhou which means you have to take a train to Yanzhou and then go to Yanzhou Bus Station to take a bus to Qufu. Luckily the Yanzhou Bus Station is very close to Yanzhou Train Station. The bus from Yanzhou to Qufu runs every 15 minutes from 6:00 am to 9:00 pm. It is about half an hour’s ride to Qufu with the ticket price of RMB5.
Qufu is a small city and might be as developed as most that tourists go to. Therefore taxis, busses, etc are much more infrequent. Standard taxis might be downright impossible to find in the off-season, particularly if you are outside of the modern downtown center.
If you are in the old town, walking is easy and most common.
You can barter with the ever present bicycle rickshaws too.
However, if you are with a larger group (ie more than 2), you may opt for a horse carriage. Granted it was the off-season, but haggling is still the way to do it. The guy wanted 45RMB for 3 hours and we eventually settled on 60RMB for the entire day. He even went into some of the sites with us and acted as our tour guide. (watch out where he takes you because he might get a kick-back from shops if he brings clients)