The Short Answer
You’ll need to work with the notario who will close your transaction. If you are in San Miguel de Allende, the notario’s office will draft the power of attorney (POA) for you, and you can sign it at their office.
If you are outside of the city, it can be sent to you. From there, the steps necessary to complete the process depend on your home country.
To learn all the details, go to The In-Depth Answer.