It is not a social security number, but an identification for tax purposes. It is compulsory for foreigners to obtain one when they have property in Spain. The NIE number never changes, even if the person buys and sells many different properties. In the event of the property owner selling up and moving out of Spain, that number will remain theirs, regardless of the amount of years spent away from Spain.
This NIE number must be quoted when paying any kind of tax return in Spain. At present, the Spanish system states that the applicant must acquire this number personally and their presence is requested at the Police Station. This sometimes causes some degree of inconvenience to the new property owner, but we aim to help and assist as much as we possibly can.