The codice fiscale or fiscal code is a unique identification number assigned to all Italians at birth by the Ministry of Finance. Any foreigner can request the Ministry to issue a codice fiscale without any formality. This code is used to uniquely identify any citizen for tax related purposes and hence is requested by (almost) any public office as a simple way to uniquely record your data. In order to request the code you must show an identification document (ID card or passport with visa) since the code is generated combining your birth place, birth date, name and surname.
This code is necesary for you to open a bank account, rent an apartment etc. If you are a non-EU citizen you should have it in order to get your Permit of stay. The easiest way to get this code is to go to the Students' Secretariat where they will help you fill in the forms and make the codice fiscale request. Another manner is to go directly to the Agenzia delle Entrate Office in Via L. Stock, 4 and ask for a codice fiscale there, in this case you should bring your passport and fill the relevant form.