Hello,

Welcome to the belegal forum.

Visa extensions can only be applied for when there is a matter of medical/family urgency or force majeure like an accident or illness. If you applied for a tourist visa when your real interest was to travel to Spain and work here, you will need to go back to your country and apply for the appropriate work and residence permit at the Spanish embassy. If the need of the extension is related to studies, your university or college should provide with the appropriate certificates, though you would still need to apply for the visa from your home country as you cannot apply for a visa modification from tourist to student.

Regards,