"Normally" the conversion is done by the card issuer (Visa, Mastercard etc.), and they give you the "interbank" rate, which is good. The ATM owner does not set the conversion rate, the rate will be the same for all machines. Some (not many) machines have fees, but they must always tell you and you can say no and go elsewhere. If there are other fees, they are added by your bank.
EXCEPT if it offers to process the transaction in "your currency", always answer NO. If you say yes, that is the dreaded DCC, and you are giving the ATM owner permission to do the exchange at whatever rate the want.
The same warning applies to credit cards. If they offer to do the transaction in your currency, always insist on the local currency and the exact amount shown on the bill.