Students studying in Spain who hold an EU passport will have a relatively simple time obtaining a work permit in order to stay in Spain. For students from other countries, the process is a bit more complicated. Before you can apply for the work visa, you would need to find a job that will hire you and can show the government that there were no suitable local candidates for that position. They can then sponsor you for a work and residence permit, after which point you can apply for a work visa.