Spain is a member of the EU and thus accepts Euro as a legal tender. The Euro replaced Pesetas in 2002. One Euro is 100 cents. Very few places in Spain will allow you to exchange old Pesetas for Euros, Most establishments in Spain will accept Credit Cards, even those that are located in small towns.
Avoid exchanging money at airports and hotels, unless very necessary as these will usually have a poorer exchange rate than ATMs or Banks. While exchanging money, try to give undamaged banknotes of your home currency and get the Euros in a similar state. Try to avoid being charged ATM fees by withdrawing large sums of money at one go instead of swiping your card multiple times. You may be offered an option to transact your card in the home currency. Decline the same as in such a case, the exchange rate is decided by the Greek Banks rather than your home bank increasing your chances of being swindled.