oshelef offers some sage advice. But in the end, if it has a Cirrus (MasterCard) or Plus or Star, you can use it.
Beware of foreign bank fees with some cards - if it's $5, you pay regardless of whether you extract $50 or $300 at one time, in MXN Pesos. Also be aware some cards may charge forex fees, though your card may just use the bank rate. If you use your credit card, that is a cash advance, and will likely have more onerous terms than a purchase.
Beware of stores / providers offering to bill your card in US Dollars - they will most likely play the "dynamic currency conversion" - the merchants use
their own rate and you find you paid more than you intended.
Link to Wikipedia discussion on DCC.
Try to figure how much you will need - you may not get a great deal on your pesos once you leave Mexico, and in many cases U S dollars will be accepted (just watch the offered rate!) On weekends, especially Sundays, cash machines may be exhausted - this is very true in the Cancún area, with hordes of cruise ship folks causing an "ATM run".
Also eyeball the ATM - not just in Mexico, but anywhere. Is it in plain view, are there folks hanging about that might make you nervous? Move on. Is the ATM plain, or does it have, say, a bulky card reader that looks like it has some parts added on, sometimes with a brochure holder n the frame of the ATM facing the card reader? Move on - some ATMs have card readers "grafted" on by bad guys.
Use the ATM when the bank is open if at all possible. Some place little plastic strips inside to trap you card - when you can not withdraw it, the usual drill is some nicely dressed and "helpful" person tells you it's a known problem and please try your PIN a couple of more times.
ATM / Cash card trap
That will not work, but once you leave the person retrieves the card and now has your PIN. These will generally occur at ATMs that are standalone or near a bank that is closed.
The other kind of trap is one where your ATM card is accepted but a steel trap prevents the ATM from actually dispensing cash - until the bad type who installed the trap removes it and gratefully accepts your cash.
Cash or "glue" trap with false front occluding cash dispenser
In Mexico, but we live in Roseville, CA and they found a "grafted" ATM in nearby Auburn last week, and we've had these issues for some time - they exist in Mexico as well. And this version is from the U.K.
U. K. rigged ATM, c/o U. S. Embassy
There are even some ATM / cash machines with an entire face over the original, which record your card and PIN but dispense nothing but grief for the would-be customer - as mentioned previously, examine the mechanical condition of the machine and use those at open banks and areas that are watched and active for some protection.
Phony cash machine face plate
Don't leave your cards in your purse or baggage - a particular instance that's popular (it happened to my sister in Cancún at a pricey resort) is you are offered use of a day room, and decide to go swimming or whatever. In my sister's case, she merely used the bathroom to change into her swimsuit, and when she emerged there seemed to have been no problem.
Someone had taken ONE card from her purse (and sometimes they merely get the number and your identification information) and by the time she became aware of the issue at he airport her card had been severely hit with charges.