Spain is a part of the European Union and the Schengen area, so to enter Portugal, you may need a passport and/or a visa, depending on the country you live in. Citizens from the European Community don’t need a visa for entering Spain.
Besides the Schengen countries, the following countries and states do not require a separate visa to enter the Spain:
Albania, Andorra, Antigua and Barbuda, Argentina, Australia, Bahamas, Barbados, Bosnia and Herzegovina, Brazil, Brunei Darussalam, Canada, Chile, Colombia, Costa Rica, Dominica, El Salvador, Former Yugoslav Republic of Macedonia, Grenada, Guatemala, Holy See (State of the Vatican), Honduras, Hong Kong, Israel, Japan, Kiribati, Macau, Macedonia, Malaysia, Marshall Islands, Mauritius, Mexico, Micronesia, Moldova, (Republic of) Monaco, Montenegro, New Zealand, Nicaragua, Palau, Panama, Paraguay, Peru, Samoa, San Marino, Seychelles, Serbia, Singapore, Solomon Islands, South Korea, St. Kitts and Nevis, St. Lucia, St. Vincent and the Grenadines, Taiwan, Timor-Leste, Tonga, Trinidad and Tobago, Tuvalu, United Arab Emirates, United States of America, Uruguay, Vanuatu, Venezuela.
Since Spain is part of the Schengen agreement, the Schengen visa requirements are the same as in other Schengen countries. To apply for the visa, you’ll need the following documents: filled visa application form, 2 photos, passport and copies of previous visas, Schengen travel insurance, cover letter stating the purpose of staying in Spain, flight information, hotel reservation, proof of civil status, proof of sufficient financial means. The visa will cost you 60 EUR.
The process of getting a Spanish visa depends on the country of your origin, but generally you can apply for a Spanish Schengen visa up to 3 months before your planned trip. The processing time may take up to 15 days since the day of your application.