First it's better you have a NIF. The NIF is a document that identify all the tax information of his owner. Without this you cannot do any rent contract, open a bank account, register in
health center.
To have your NIF, you need to go the financial house of your city and show your
visa and the proof of address