Depending on which country you are from and your level of studies, the application procedure for Spanish universities will differ.
If you want to begin your higher-level education in Spain, you must be able to validate your pre-university studies before the Spanish Ministry of Education. These studies should be comparable to the Spanish Bachillerato, which is the two-year, post-compulsory stage of education for those wishing to enter university.
Whether you are obliged to do the Spanish university entrance exams (Selectividad) or not also depends on your citizenship status. Note that these exams are divided into two phases – the general phase and the specific phase. The general phase corresponds to 10/14th of your mark, and the specific phase accounts for the final 4/14th, the maximum mark being 14.