Spain requires those who enter the country from within or outside of the European Union to prove their identity. Visitors from the European Union can simply show their national identity card. Other travellers need to show a valid passport.
Tourists from outside the EU are advised to check whether they need a visa. Should this be the case, they can obtain one from the Spanish consulate in their country of residence.