As I remember, it takes about a month after you turn in your paperwork for the student residency to get your NIE. You will receive a letter in the mail that tells you to pay a fee at a bank and then come in for fingerprints at the comisaria. The letter will have your NIE on it. Then you get your actual residency card 20 days later, with your NIE on it.