Passports are not normally stamped when you leave Mexico. But they must be stamped on entry. You will probably be given 180 days and you will have to go to a bank to pay for your FMM if leaving by land. You will also have to stop at Migracion on the way out, to hand in the FMM and to prove you have paid. When flying, the fee is included in the ticket price, with the exception of charter flights from the UK!