If you are visiting Mexico as a tourist, you don't need a visa, but you do need a tourist card (Customs Form for Tourists). You will be given this on arrival by completing an immigration form, available at border crossings or on board flights and which is valid for 180 days. This document is also available at airline offices and travel agencies. A part of the form will be returned to you, and you need to keep it in order to leave the country. If it is lost, it can be replaced at an immigration office at the airport for a fee.