It's usually impossible to extend a Schengen visa for tourism. There are a couple of exceptions/alternatives:
You can request an extension of your Schengen visa if you have a very serious reason (e.g. illness or family emergency) but not merely for convenience or because you changed your plans.
You might be able to apply for an entirely different visa (a national visa, not a Schengen visa, e.g. a spouse visa if you are married to a Spanish citizen) but I don't know precisely what's available in Spain and that's most likely not applicable to your situation.