The key point is to find a job on which the employer would sponsor your visa application. you should obtain a visa before start to work in Spain. Here are some details about work permit in Spain - http://www.Spain-visas.com/Work-permits-in-spain-for-Workers-from-outside-the-E-C-M--pag4.htm
Application for work permit usually takes 3-6 months and should be filled with
Please find here the outlined for the work visa application procedure - http://www.spainexpat.com/spain/information/work_visa_in_spain/
here is some additional information from Spain consulate - http://www.consulate-spain-chicago.com/work.htm - Please be aware that pre-approved Official Work Authorization is required.
If you do not have a sponsor - you better to find one.
In this case you may not get work permit. You may get a tourist visa and stay up to 90 days while looking for a job and your work visa. You'll still have to return to your home country to get a work visa.
DISCLAIMER: Answers from Experts on JustAnswer are not substitutes for the advice of an attorney. JustAnswer is a public forum and questions and responses are not private or confidential or protected by the attorney-client privilege. The Expert above is not your attorney, and the response above is not legal advice. You should not read this response to propose specific action or address specific circumstances, but only to give you a sense of general principles of law that might affect the situation you describe. Application of these general principles to particular circumstances must be done by a lawyer who has spoken with you in confidence, learned all relevant information, and explored various options. Before acting on these general principles, you should hire a lawyer licensed to practice law in the jurisdiction to which your question pertains.
The responses above are from individual Experts, not JustAnswer. The site and services are provided “as is”. To view the verified credential of an Expert, click on the “Verified” symbol in the Expert’s profile. This site is not for emergency questions which should be directed immediately by telephone or in-person to qualified professionals. Please carefully read the Terms of Service (last updated February 8, 2012).