Pingyao is small enough to cover comfortably in two days, and the main sights are all inside or just outside the ancient city walls. A combined ticket (通票, tōng piào) covers most of the major sites including the city wall, Rishengchang, the Ancient Government Office, the County Yamen, several temples, and a handful of historic merchant houses. Buy it at any of the included venues.
The city wall itself is the best starting point — walking the 6.4 km perimeter takes about two hours and gives a commanding view over the roofscape of courtyards and tiled roofs below. The Rishengchang exchange house (where China's banking system was effectively invented in 1823) is the single most interesting building in the city. The Shuanglin Temple, about 5 km outside the walls, contains some of the finest painted clay sculpture in China.
Rent a bicycle inside the old city — the streets are largely flat and wide enough for bikes — or hire a pedicab for short distances. The old city is completely walkable; the temples outside the walls require a vehicle.