Nationals of the EU/EEA can travel to Spain without limitation with a national identity card or a valid passport.
Nationals from Andorra, Argentina, Australia, Bolivia, Brazil, Brunei, Canada, Chile, Costa Rica, Croatia, El Salvador, the United States, Guatemala, Honduras, Israel, Japan, Malaysia, Mexico, Monaco, Nicaragua, New Zealand, Panama, Paraguay, the Republic of Korea, San Marino, Vatican, Singapore, Uruguay and Venezuela can also travel to Spain without a visa upon presentation of their valid passport and for a limited period of 90 days.
For nationals of other countries, a tourist visa is necessary for entering Spain. You can opt for a Schengen visa allowing you to travel within the Union for a period of 90 days. For more Information about the Schengen visa, visit the European Union website at http://www.visa-schengen.info/visa-schengen.html.
Schengen visa info
Ministerio de Trabajo e Inmigración - Ministry of Labor and Immigration