Perhaps it's cheaper to buy a locked one and then have it unlocked. Check how much is the difference between the same model of phone and how much it costs to unlock it.
---
If someone calls you from abroad to your mobile phone, he/she pays for the international phone, but you have to pay for a fixed phone to mobile phone call (I think this is the way it runs, though I'm not 100% sure).
Actually, it is a bit different from that. Providing that you are in Spain, you never pay for the incoming calls.
If you happen to be, let's say, in Portugal with your Spanish phone, then you do pay for incoming calls because your cell phone is using the foreign network. Thus, your caller pays a normal call to a cell phone and you (the receiver) pay for the difference with the international call (I don't know exactly how much it is that).
By the way, receiving text messages abroad with a Spanish cell phone is also free.