The colonial centre of Trujillo is walkable; the Plaza de Armas and main museums are within easy reach on foot. For the archaeological sites, you'll need transport.
The cheapest option for Chan Chan and Huanchaco is a combi — shared minibuses run regularly from Avenida España along the Huanchaco road, passing the Chan Chan turn-off. For the Huacas del Sol y de la Luna, take a combi south along the coast road or hire a taxi.
Taxis are plentiful and affordable; negotiate the price before getting in. Mototaxis (three-wheeled motorcycle taxis) are useful for short hops around the centre. Several agencies near the Plaza de Armas offer tours to the main sites with guides, which can be worthwhile for the Huaca de la Luna where explanations of the murals add real value.