In Mexico City and most other tourist destinations in Mexico, there is an authorized taxi service that operates out of the airport and major bus stations. This is to help ensure the safety of travelers. You purchase a ticket that has a number on it and at the taxi stand they record the number of your ticket and the number of the taxi and identification of the driver you depart with, so in case you encounter any difficulties, you can trace your driver through the number on your ticket stub. Although authorized taxis cost a bit more than a cab you can hail on the street, it's a good idea to always take them when available (the price is still very reasonable).
How to Take an Authorized Taxi
First, locate the authorized taxi booth or stand. These are usually marked by the sign "Taxis Autorisados" or in airports, the sign may read "Transporte Terrestre." There may be taxi drivers standing around trying to solicit your business. You should avoid these guys (say "gracias" and just keep walking) and head to the taxi stand to purchase your ticket.
At the taxi booth, you will see a map of the city marked off in zones and the cost of transportation depending on which zone is your destination. Tell the ticket agent your destination (for example: "Centro Historico" or if you're not sure of the area, tell them the address of your hotel) and pay the fare. This fare is for up to four people with up to two bags per person. If there are more than four people in your party or your luggage will not fit in a sedan, then you will have to pay more for transportation in a larger vehicle.
After purchasing your taxi ticket, proceed to the taxi area. You should see signs with arrows pointing you in the right direction. There you will give the ticket to the attendant, who will show you which taxi you will take and help you load your luggage into the car. Tell the driver your destination, and off you go. It is customary to tip the attendant who helps you board the taxi (20 or 30 pesos is fine), and you can tip your driver if he helps you with your luggage (ten pesos per suitcase is a good starting point), otherwise, there is no need to tip your driver.
Other Forms of Transportation
If you don't have much luggage and you're traveling on a tight budget, you may want to forego taking a taxi and choose an alternate, more economical form of transportation. Some people walk out of the airport and hail a cab outside on the street, that will charge them less than an authorized taxi. In Mexico City, there is also the option of taking the metro bus or the metro directly from the airport (the station is Terminal Aérea).