When you get a residency card (for the older, green ones which are really a registration card or "registro") they are initially temporary ones, that is, up to 5 years.
Once you have had a registro card for 5 years, you could change them to one that said permanent, that means you are a permanent resident in Spain with all the advantages of a Spanish citizen.
However, there was no need to do so as, once you have had the card for 5 years, you automatically become a permanent resident whether or not you change the card. (and that is laid down in EU regulations for all EU countries).
Now, you get a TIE or foreigners' ID card. The only advantage is that you can use this as an ID document as it has your photo on it whereas you can't use the green one for ID (no photo).
The Spanish government have issued advice on what is acceptable to prove you are a resident.
I have posted this before but no harm in doing so again.
Proof of ResidencyThere is also a link on there for more information but note the bit that says "Registration certificates issued more than 5 years ago also remain valid, even if they do not say ‘permanente’ on them."