Just to elaborate on Ethel's (perfectly correct) answer:
To call the UK from abroad, you need first to access their international exchange service. In Spain (and in many other European countries) this is achieved by dialling '00'. However, there are some countries which use a different international access code. Mobile phones should have a + key somewhere on the keyboard. (On my Nokia, it's accessed by rapidly pressing the * key twice). Using + automatically accesses the international exchange of whatever country you're in.
Then you need to dial the UK code, which is '44'. (That's always the same, wherever you're dialling from).
Lastly, you should dial the full UK number but omitting the initial zero.
Chris