Most Brazilian taxis are equipped with meters. The fare shown on the meter when the ride finishes is what you are supposed to pay. The only supplement that can be added to that value is one for carrying suitcases.
There are two tariffs: normal, (or bandeira 1, identified by a number 1 on the taximeter), and the bandeira 2, more expensive, applied to rides at night or during Sundays and bank holidays (identified by a number 2 on the taximeter).
In rural areas taxis can have fixed fares depending on where they are taking you. In urban areas you can negotiate your fare when you are making a long ride (to the airport on the outskirts, for instance).
In general, Brazilian taxi drivers are honest and will not try to cheat on you. The exception to this rule are unlicensed taxis opperating at the airports – there are hundreds of them. The fact that they are waiting for passengers at a place where they are not allowed to work gives you an idea of what you can expect from them.
In large cities such as São Paulo or Rio it is quite common for the taxi driver not to have the faintest idea of how to get to your destination. If you are going into far away neighbourhoods, is good to have an idea of how to get there so you can show the driver should the need arise.
Taxis can be hailed on the streets, you can find them at taxi ranks (pontos de taxi), or phone for them.