You begin the process at the Spanish consulate in your home country, a lot depends on your age, employment qualifications, income, nationality, accumulated wealth, pension, ability to speak Spanish, health insurance. You name it and the Spanish authorities will want it. I started the process 18...