Bus from Jinan is the usual way, or on a tour. There are buses all day, but check the last departure or you may be spending the night.
There are regular all buses from Tai'an (1 hour), and Qingdao (5 hours).
The main Beijing-Shanghai railway line passes through Yanzhou which is 15 km west of Qufu. You can easily get taxi or bus to Qufu from the station there.
Walk or if you stand in one place too long, hordes of people will offer to transport you via all manner of vehicle, from rickshaw, to bicycle, to taxi, to beast. It's small enough to walk.
There are quite a few temples. You pay for admission to all the good sites and wander among the sacred buildings, every day buildings, and so forth. A guide or guidebook is essential as many of the sites are very big.
The main areas to see are the Confucian temples, the Confucian mansions, and the Confucian forest (just north of town). It's very touristy and loaded with guides herding sightseers with little flags and megaphones. English is not widely spoken.
One tip is to go to the Confucian cemetery towards the end of the day (maybe at 4) and then stroll around until the tour groups are leaving, and you will have the forest for yourself. Walk to Confucius grave and share some silent moments across 2,500 years with him. A treat if you have been travelling around China for a while and are tired of hoards of people and noise.
The town itself is quick to walk through and nice along the main streets. There are some old, restored gates and a winding creek to add atmosphere.
There are tourist stands all around the temples and shouts of "hello! hello!" can be irritating. The main buys are copies of the Analects and a "chop" with your name engraved on it or something like that. Otherwise, it's the usual tourist stuff.
Finding a place to sleep isn't difficult, as you will probably be approached by people offering accommodation. Outside of the tourist season you can probably bargain pretty hard on the prices.