This type of visa allows prolonging your stay on the territory of Spain.
If you are planning to study in Spain more than 180 days, the first step you need to make is to visit a website of Spanish Consulate of your country and learn the information on that type of visa.
On the website, you will also find the information how to make the appointment to submit the documents and how to legalize them.
Each Consulate has its own rules to get the appointment, in some cases, you need to make online request, while in other Consulates you should go directly and queue.