Spain uses similar GSM mobile networks (GSM 900 and GSM 1800) as United Kingdom so you should be able to normally use your mobile phone.
According to the EU regulations your messages, calls and Internet mobile data in Spain will cost the same as in United Kingdom. Note that there is fair-use policy which means that the use is limited to business & leisure.
Common data package size in GB (Gigabyte) and it's price, common carriers and network capabilities.
Mobile phone category is available in production API version 2.