If not drivers will carry a booket of the official rates authorised by the local town hall. Since there are supplements, such as extra baggage, night service, etc it may be prudent to clarify the price in advance as unscrupulous taxi drivers have been known to charge more to unsuspecting tourists. Official rates should be displayed at airports and inside any licensed taxi. There are generally taxi ranks in city centres and it is possible to hail a taxi in the street, just look for the green 'libre' notice on the windscreen or the green light on the roof at night. Bars and restaurants will call a taxi for you, if necessary, and tourist guides will generally include a few local numbers.
Taxis are excellent value in the city centres where parking and congestion can be a nightmare.
They are also a very safe way of travelling.