If you want to live or invest in Spain, you need a NIE number for practically all agencies. The NIE is an identification number for foreigners or in Spanish ‘Número de Identificación de Extranjeros ' (NIE). It is a unique, personal and exclusive number that the Directorate General of the police assigns to foreigners.
Spaniards have a Documento Nacional de Identidad (DNI) on which a similar number is written which is then used for everything, from the car registration to the tax affairs and the passport, a number for everything. That number is called Número de Identificación Fiscal (NIF). The same applies to foreigners with NIE- numbers.