You may come to Mexico as a tourist, but working is prohibited.
You may apply at the nearest Mexican Consulate in the USA, with all your ID, Passport, Bank statements, Birth certificate, etc., for a residence permit, either temporary or permanent. There will be income and financial resource requirements to be met, fees to be paid, and a completion process with immigration authorities, including proof of residence in Mexico. There are also time constraints for each step in the process.
If you will need to work, you will need the express permission of the immigration authorities and/or a visa which will permit work in your specific field. Have your transcripts/degrees translated and apostilled, if that is the case. Otherwise, you will need to be self sufficient while in Mexico, either by pension or online work which does not involve Mexico.