Spain is part of the European Union. There can be some minutes differences in procedures and interpretation but broadly speaking, it means that:
- You can import just about anything for your personal use from other EU countries, including the UK. The only major exception beyond things that are illegal in most European countries are “means of transport” (i.e. a new car, a plane or a boat).
- The rules on imports from outside the EU are the same than in other EU countries. If you have difficulties finding a good source of info, guidance from the EU itself or from other EU countries should generally apply to Spain as well.
For example, you can carry fresh food, 10 liters of spirit or hundreds of cigarettes over the border with France or Portugal, order books or food from online shops in Germany or the UK without any concern – even alcohol if they offer it, which they sometimes don't because there are special restrictions on that and the vendor, not the customer, has to take care of the extra paperwork. Within the EU, VAT and the like are taken care of by merchants and as long as you are not importing illegal drugs, counterfeit goods or huge quantities of tobacco to resell it, you can't really do anything wrong.
On the other hand, if you import something from the US or China, you might have to pay some taxes or run afoul of some rules about food safety and the like. For example, a colleague once received a bill from the customs for a single book ordered from the US. They just opened the parcel and found an invoice without proper import papers.
So if you want something from outside Europe, it might be easier to look for an importer in another European country than to order directly. For example, I often order English-language books (even those published in the US) from the UK and Germany, where they are reasonably cheap and easy to get rather than from the country I live in or directly from the US.