To stay in Italy past 3 months without a visa you need a permit to stay.  Applying is relatively simple.  You can apply in a Post Office in Italy or at your local commune office.

 

The Post Office has all the information on how to apply on it's website, the information changes, so not worth us putting it here.  But basically you have to either be from the EU and then you can apply, or outside of the EU and have to prove an income or that you have a reason to stay.

https://www.poste.it/prodotti/guida-rilascio-e-rinnovo-permesso-di-soggiorno.html

 

There is a specific immigration website that gives you up to date information on how to apply.

https://www.portaleimmigrazione.it/

 

The Italian National Police Force also have a decent website, that you can read in English that explains all the procedure.

 

https://www.poliziadistato.it/articolo/10930