In this link you can find the Spanish Embassies and Consulates overseas. The main recommendations before traveling abroad are the application for your passport and visa in some countries. At the end of the linked page, “Countries lists,” are the specific reports for each country.
In case you a Visa is required, you can go to the country Consular Offices you will study.
It is also required to apply for OnCampus health and accident insurance; it is a mandatory insurance for students, professors and researchers, and administrative staff. Once you have formalized the insurance you have to send an informative email to email@example.com