If you plan to stay for long time (a few months) or travel to/from spain a lot, perhaps best solution would be a contract with Movistar and apply the “Mi Gente” and “Daily Roaming” bonus. With this your calls to the select country will be at a very cheap rate, and when you’re outside spain, incoming roaming calls will be at 1?/Day instead of having to pay for each received call when you’re in a roaming zone. Only inconvenient for this is that you need bank account in spain. You can also get prepaid card and apply these two bonus, but the calls won’t be that cheap.
If you get the contract without a GSM device, you don’t have the any penalization if you cancel the line, so my best advice if you are going to use it for less than 18 months is get a unlocked or free gsm phone and make the contract without including any gsm phone.
As a final comment, Movistar, Orange & Vodafone are the main operators in spain, other company’s like yoigo, simyo, etc are type-2 operators who don’t have their own infrastructure but use the one from main operator, basically reselling minutes of air. Type 2 normally are cheaper calls if you call between the same operator, but expensive if you call other operators or other country’s.