Spain Visa Regulations and Visa Info

All citizens of the European Union's countries as well as of Switzerland, Norway, Liechtenstein, and Iceland do not need a visa to enter Spain. The valid passport or National ID card are required for adults, for those under 16s being written in the passport of the parent or the tutor will be enough until s/he is the same nationality with the parent/tutor and is traveling together.
All citizens of the member- country of the Schengen agreement that are Austria, Belgium, the Czech Republic, Denmark, Estonia, Finland, France, Germany, Greece, Hungary, Italy, Latvia, Lithuania, Luxembourg, Malta, the Netherlands, Poland, Portugal, Slovakia, Slovenia, Spain, Sweden, plus Iceland and Norway, do not need a passport to enter Spain, instead they may provide just the National ID card.
Citizens of the following countries do not need to have a visa while entering Spain for up to 90 days, however, need to provide a valid passport:
Andorra, Australia, Argentina, Brunei, Brazil, Chile, Canada, Costa Rica, Croatia, El Salvador, USA, Guatemala, Honduras, Israel, Japan, Mexico, Malaysia, Monaco, New Zealand, Nicaragua, Paraguay, Panama, Respublica Korea, Singapore, San Marino, The Vatican, Uruguay, Venezuela.
The citizens of all other countries are required to have a visa to enter Spain.
In case if the transit passengers are continuing the travel with the first connection aircraft, holding valid return documentation, and are not leaving the airport, they do not need a visa. However, the citizens of Afghanistan, Bangladesh, Congo, Ethiopia, Ghana, Iraq, Iran, Liberia, Nigeria, Pakistan, Sri Lanka, and Somalia need to have a visa anyway.
The Short-stay visa is valid for 6 months after the date of issue and allows to stay in the county for a maximum of 90 days per one entry.
Transit visa is valid for 5 days per entry including the day of the arrival to the country, the new application might be made each time to enter the country under Transit visa.
To obtain a visa, the one shall provide an application form, 4 passport-size photos, valid passport, return travel ticket, confirmed accommodation, evidence of sufficient funds, letter from the employer of the university in case if the one is applying for the student visa, and a particular fee of around 60 euros depending on the terms of application.
Student visas are quite easy to obtain by providing the letter from the university the one is studying at the moment, however, the process may take some time.
To work in Spain the one needs to provide an official offer from the company located in Spain, however, that might be quite difficult for the citizens of non-EU countries.