This has been a topic of debate over t Dave's Cafe Mexico forum. It seems that immigration departments vary from state to state within Mexico on what's needed to get one. The basics that everyone agrees on is that you have to do it from within Mexico, and you have to show a passport, proof of address in Mexico, and most importantly, your apostilled or certified qualifications for working independently within a narrow field. Since that probably means teaching English for you, that means you'll need to show either a relevant degree, a TEFL type diploma, or both. The issue of qualifications is where the debate lies...some immigrations departments such as Mexico City and perhaps in other central states, it's more lax. Some immigration departments won't issue one at all, likely in resort or beach areas.
Another topic of contention is how often you need to renew it. Some say 1 year, others say 6 months.