Snowbirding is customary to many retired Canadians. Our winters are harsh and when given the chance, many will head south to better climates for several months. The US and Mexico, the most usual destinations for Canadians snowbirds, allow a six month stay. When starting planning our long-stay in Spain, I never even thought six months was going to be an issue.
Spain is part of the Schengen Agreement which consists of 26 European countries. The Schengen Area operates very much like a single state for international travel purposes with external border controls for travellers entering and exiting the area, and common visas, but with no internal border controls. Non-Europeans can only stay 3 months in the Schengen area at a time and a total of two 90 day period in a given year. So, this means that you can not stay in any country of the Schengen area without a special visa and no, you can NOT go out of the country or area for one day and come back. The periods must be separated by 90 days.
Read the full blog post I have written which outlines the full process and walks you through the steps. It is not very difficult but it takes time and it is so worth it even if it is only for one year as we thought. Of course, we fell in love with Spain and we ended up renewing it every two years. The second link below goes through the renewal process.