I'm wondering where the visas are processed and what office handles them
It depends on your situation and what type of visa you require. I suggest you call your closest Spanish embassy and ask them.
For me: I am from a non-EU country (makes a difference) and I am married to a Spaniard (makes a HUGE difference). After consulting the consulate and gathering the required paperwork I flew to Spain with my husband. We went to the Foreigner's Office which was in the capital of the province we live in and filled in a form. There is a three month wait and then we will head down to the Police Station with more papers ect. and then (fingers crossed) they will give me permission to live and work in Spain.
What type of visa do you want to apply for? residence/work/retirement
Are you an EU citizen? If not, do you wish to work legally in Spain? If this is the case do you have an employer to sponser you?
There can be a lot of confusion trying to get reliable information off of the internet. Especially when dealing with visas, where information becomes dated quickly, it is best to go straight to the source! Not that it won't be a challenge, but at least they have a responsibility to provide you with information.
If you still have doubts you could try and contact an immigration lawyer.
Gov. Site Which Might Help:
http://www.map.es/servicios/servicios_on_l...xtranjeria.html