The first thing you will need is the Permesso di Soggiorno. Then you should get either a letter from someone hosting you or a registered rental contract providing you with a physical address. Keep in mind that often landlords do not like to rent out their place to someone who wants to get residency as potential eviction is heavily favored toward the tenant and can be very lengthy. It basically means you have more legal rights once established residency in term of recourse. (2019 update) With the current government in power, your city hall may need a proof of work or income in order to give you residency.
Next comes the wait for the police to visit your address. Sometime in the coming weeks, they'll make an unannounced visit to confirm you actually live at the address. A few days after they visit, pop by your anagrafe and see if your residenza is complete. If so, they will print you a certificato di residenza (useful for many things - signing up for health care, getting a drivers license, reduced utility rates, etc).
It is advisable that you also apply for a carta d'identita', which is a handy photo ID with your address, etc. It is basically needed in just about every paperwork you do in Italy.
Please note: residenza anagrafica (as described here) is a different animal than tax residency. Tax residency is beyond the scope of this article - please consult a tax expert or commercialista for details specific to your circumstances.