It is the document that certifies that an EU, EEA (Norway, Iceland, Liechtenstein) or Swiss citizen legally resides in Spain. It is a green A4 sheet containing your NIE, name, nationality, address and registration date. It is regulated by Royal Decree 240/2007.
It is mandatory if you are going to live in Spain for more than 3 months. You must apply within the first 3 months of your arrival. It is not the same as the TIE, which is for non-EU citizens.