Obtaining NIE number in Spain
Numbero Identificacion de Extranjero (or NIE) is a unique identification number, assigned to all non-Spanish residents in the country. This number will stay with you throughout your life in Spain, unless you apply for citizenship - then you will get the so called DNI number.
For any economic activity, you will need NIE number. Without it you cannot contract and services or start a job. Even for some regular purchases you might be asked to provide your NIE in order to be issued an invoice.
The procedure for getting a NIE is quite simple if you are an EU citizen. However you must be aware of the conditions that would apply to get your NIE on a white paper and on a green card.
Different NIE types
Actually the NIE number is always the same, only the medium that it is printed on might differ. As an EU citizen, you are allowed to live and work in every member state. When you arrive in Spain, it is possible that you still do not have a confirmed work contract, but you are planning to search for jobs directly onsite. Employers will ask you for your NIE to hire you, the government will ask you for contract to give you NIE - it sounds like a magic circle, but it is not.
When you arrive in Spain, you can obtain NIE number immediately only by providing your passport at the office of Extranjeria. You will get this number printed on a white paper, and this paper will contain information when additional documents you need to provide in order to get it on a green card. It is wrong that this paper has validity - no. Validity has your request - and it is 3 months. Within 3 months you can provide the Extranjeria with the desired documents, without paying a new processing fee. When the 3 months are expired, you can still provide the missing documents, but you have to pay again the fee. It is not a big deal, the fee is about 11 EURO.
Initial application for NIE
Assuming that you have no job offer, you will be visiting the Extranjeria with your passport only. You will need to make an appointment online. For Madrid, for example, EU citizens are served exclusively at Padre Piquer, near Aluche. Waiting times are really high - if you are lucky you can get an appointment within 4 weeks, so it is good to plan this in advance.
The application you need to fill in is EX-18 - this is a form for inscription of EU citizens. Do not fill EX-15 -- it applies only to non-EU citizens. Then you need to pay the fee, which you can do at any bank, and you can go directly to your appointment.
Since you might be asked questions, if you are not confident in your Spanish language skills, it is a good idea that you ask someone who speaks the language to go with you.
Cases in which Spain will give you NIE on green card
As already mentioned, NIE printed on a green card is considered to be permanent one, meaning that you are resident. There are several cases based on which you can get it:
Working for somebody
The easiest way is to be employed by somebody - then your employee will take care of the contributions for social security, and the state will gladly grant you residence.
Working for yourself
You can register as a self-employed, with the easiest way being opening an autonomo company. It costs nothing and you can accomplish it within a couple of hours. Of course you can hire someone to do it for you. In this case you are responsible to pay by yourself the contributions for social security. As of 2018 there are deductions for new autonomos, lowering the contributions to approximately 50 EURO/month during the first 6 months, and gradually increasing until the full amount of approximately 250 EURO/month is reached after 2 years.
Having sufficient funds
If you have enough money to live without working, you can provide proofs to the Extranjeria in the means of bank statements and contract private health insurance. This way you will show that you are not going to be a burden for the social security system, and they will gladly grant you residence since you've decided to spend your money in their country.