It's not a bad idea if you feel you can enjoy it & if you have some money to spare. Prices have plummeted in the last few years and there are some incredible bargains - from 50-,000€ for a decent village house up into the hundreds for a beautiful country house with pool etc.
I don't agree with Steve P. - unless you're seeing it purely as an investment. Life is also about pleasure - & the house I bought 4 years ago in Spain (when prices had dropped, but not as much as now) has proved a wonderfully relaxing retreat. Advantages = you know the place & area, so don't feel duty-bound to sight-see, you know your neighbours, overheads are low if it's not a managed community, you don't have to waste agonising hours selecting & booking your holiday.
Disadvantages = money tied up for some time to come.
How to go about it? Identify the region you're interested in and go there to drive around. If you speak Spanish that will help. If you don't, look out for a bilingual abogado (solicitor) or para-legal - the latter cost less & can deal with everything right up to signing in front of a notary. Read up on expat websites first, there's masses of info out there.
Good luck!