I entered Mexico by air and got a 180-day visa. However I then went to Guatemala for 6 weeks and reentered into Mexico by bus. I seem to remember someone saying that the new visa, when we enter by land, is only 90 days, but I am looking at the immigration card they gave me when entering and I see no mention of the length of the Mexican visa.
Visas to enter Mexico, if you need one, are obtained before entering the country (eg from a consulate in your home country), so I gather you are actually referring to the FMM tourist permit (which is not a Visa). This permit just says you have been permitted to enter Mexico for the specified number of days.
Whenever we had them issued we had to fill in a form (kind of like an arrival form I guess), which included things like Name, Passport Number, Date of Arrival, and Length of Stay.
The Immigration Officer will then issue the permit for the length of time you had requested, up to 180 days.
If you have to pay a fee, the fee is the same no matter how long you request (eg 18 days and 180 days will both cost about $500 MXN). If issued at the airport there should be no fee to pay (probably included in your ticket fees), and if entering by land there is only a fee if your permit is for more than 7 days.
I have had permits issued for anywhere between 4 and 180 days. Unfortunately I cannot find any old FMM permits to include in this answer - if I find one I will update to include a picture.
The permits are not reusable unless crossing by land into Baja California. Border crossings into other states require you to obtain a new permit (and pay another fee). To/from Baja you can cross into California and back without needing to get a new permit each entry.
You can also fill in the FMM online before traveling to Mexico, however you still need to print it out and have it stamped by INM on entering the country.
In 2018 and 2019 this isn´t true. The officer writes down on to the FMM tourist card the ammount of days you can stay in Mexico. It can be anything from 1-180 days and depends on the mood of the officer. Usually they automatically give you 180 days. If they didn´t write down the ammount of days you have, then you never know what they enetered in the system. Always make sure you have it. They must write it. I have crossed the border already three times there in the past 2 years and actually find it the best crossing to Mexico in regards of getting 180 days. The biggest problems are on the Belize border where you might get only 7 days which happened to me. They offer you then solutions how to make it 180 days. Figure it out how that is done in that case ;-)