If you have never done this before, consider that major real estate companies may have foreign offices. Look up ReMax for example. These companies are well versed in exactly your situation, and many of them know how to circumvent the 50km rule so you can technically buy property near a coast line (via a bank trust).
First time shoppers should look into multiple agents and compare the data they give you. If one is talking about excess fees and the other isn't, then you know something's fishy. No insight as to what or how, or if there is something fishy at all.
Consider renting first. In many places it can be inexpensive and will give you a feel of the land before you make a huge commitment. Consider places like Cancun where vacationers see a beautiful Caribbean beach in their all inclusive resorts and never consider what the rest of Cancun is like, then decide to move there. Nothing wrong with Cancun per se, but it gives you some day and night perspectives. Like going to Vegas and assuming everything off the strip is just like it is on the strip. A couple months of renting and you would know in either location.
All of this will be much easier if you learn Spanish too, as if you didn't already assume that. But often Spanish speakers get treated differently in many situations.
Now, as for the process itself, there are so many resources online that fully explain the process in detail. Here's one:
But you should brush up on those details and still talk to a real estate agent to go over them with you and answer any questions. If they aren't familiar with foreign purchases, they probably haven't had to facilitate that yet and you may want to find one who has. Like any place, there will be no shortage of agents doing this.