Single tickets are €1.30, or €1.50 if purchased on the bus (no change given) for 75 minutes of travel; day tickets are €5 and a city pass, good for 10 trips costs €12. You can buy tickets on the bus with correct change, or from the red ticket machines near the major stops (€1.50, exact change). Validate them in the machines as soon as you board the bus. Passes are available in the TPER kiosks around town. Board the bus through the front or back doors (the middle door is for descending, although it can be used if the bus is really crowded).
Most of what you want to see in Modena is in walking distance, although the city has trolley and bus lines run by the provincial bus company SETA Schedules are listed here. Tickets are €1.20 for one zone in the city; purchase on board (bring correct change).
Images by: Steve Morgan, Creative Commons license