Walking around town is the best way to see the sites and the old city.   If you need to do more extensive traveling there are taxis, buses and hired cars "louages" to get you from here to there.
Taxis are readily available and inexpensive for travel throughout the city.   Make sure the meter is reset and turned on or agree upon a fare with the driver before getting in.   It's a lot easier than arguing about a fare once you get to where you're going.
The buses are a little old and tired but they get you where you want to go.   There are bus schedules available at the tourist office, which is convenient as the major bus lot is located right next door.   The tourist office is a good place to get info on transportation as well as hotels, restaurants and attractions.  

A louage is like a small mini-van that holds several passengers going to the same location.  They are a good form of transportation if you need to get to the airport or to another city.  For travel within Hammamet the taxi or bus is generally a better option.