Residence and Golden Visa
When you come to Spain for a short time, you are officially a tourist. If you own a house in Spain, which you use for holidays and spend a few months of the year, you are still the tourist, as your permanent residence is of another country.
Visiting Spain for citizens of non-EU countries is limited up to 90 days within six months (180 days per year). Anyone who stay in Spain more than six months a year, must submit an application for a residence permit.
For the procedure for obtaining a residence permit you only need to collect the necessary documents and a petition. But before you start collecting documents, you have to think if you really need it now? Will you spend in Spain more than 180 days a year? If not, you could have problems with the extension of residence permit.
Also, when you obtain your residence permit (with or without the right to work), you automatically become a Spanish tax resident, and from this moment you have to declare all yours incomes and pay Spanish taxes.
However, now there is an interesting opportunity to obtain a special residence permit for investors (Golden Visa) in case of purchasing of the property that costs more than 500.000 €. The possession of this permit does not imply a mandatory tax residence in Spain, and does not limit the minimum period of stay in the country.