A few rules of thumb:
Whether paying directly at a merchant or withdrawing cash, refuse any conversion (DCC or dynamic currency conversion), always go for the local currency. Your bank/card issuer will charge you for the conversion but it's almost always cheaper. In some countries, local ATM will slap a fee on top of the amount to be withdrawn no matter what, but that cannot be avoided I think.
If you have a debit card, use that to withdraw cash. Credit cards typically have an extra fee for a cash advance and less attractive conversion rates (higher spread between sell and buy rate). But there are exception and some debit/prepaid card with a credit card brand (e.g. the debit Mastercards mentioned below).
Avoid buying foreign currency from your bank at home or travelling with a lot of cash in the hope to exchange it once you arrived at your destination. Both are quite expensive and even with the fees, using a card at an ATM abroad is usually cheaper than carrying and changing cash (and that's not getting into the safety issue).
If you can, check the fine print and see if you can get a better deal with another card. Depending on your location, you might not have many options but there are online banks like N26 and “fintech” startups like Revolut, which promise a better conversion rate (close to the official exchange rate, with no fees or spread). This option is best if you're going to a place with a wide acceptance for credit cards, as cash withdrawals are usually limited on these cards but you can pay in shops and restaurants as often as you like.
If you really must travel with cash and you are not bothered by the effort, compare the rates and fees and avoid airport cash exchange places or big brands, smaller places might have more interesting rates. I also assume that converting a well-known international currency in the local currency once you arrived is typically cheaper than buying an exotic currency from a main street bank in the eurozone but I have to admit that I haven't bothered verifying that systematically.
Whatever you do, you need to understand that a big part of the costs of exchanging money are hidden in the “spread”, the difference between the buy rate, the sell rate and the spot exchange rate. So if you want to compare several options, you should not only look at fixed fees but compare the rates themselves.
Personally, when going to a place where the infrastructure is limited (few ATM, a currency difficult to exchange abroad), I will take a few hundred USD for emergencies. Otherwise, not even that, maybe €50 and that's it.
Also note that nowadays many cards/banks let you set a profile (possibly through their online banking system or an app) to avoid fraud prevention measures that block your card if you use it faraway from your usual location. You might need to activate that before leaving.