Hi Kate
You need to apply at the Spanish Consulate, unless you decide to enter another schengen country prior to your visit to Spain

i.e I've heard the other consulates are of more help... Germany / France. Maybe you could whizz a quick day trip to one of these prior to your visit to Spain! The visa is usually for 6 months. I've not had information about obtaining a Schengen from one country and entering another schengen country as a first point, so I couldn't advise.
Good luck,let us know how you get on
I've been told that they are really easy and FREE to spouses of European citizens which includes the UK. Basically need to prove accomodation, funds to support trip and reason to return... ie a job here in the UK
Hope this helps
x