The Tourist Card is generally made available to you during your flight or as you arrive at customs. The tourist card will ask you basic information such as your name, flight number and airline name, etc. Click here : https://www.mexicotouristcard.com/ to access the form.
KEEP YOUR FORM! You must keep your immigration form with you during your travels. You will be required to turn in this form at the time of your departure.
After passing through immigration, you collect your bags and proceed to the exit. You will hand the form to the customs agent and press the red button on what looks like a traffic light. A green light means "go" and red means "inspection" in which case, officials perform a quick inspection.