The Withdrawal Agreement provides that UK nationals and their family members have the right to receive a new residence document in electronic format. The document states that it was issued based on the Withdrawal Agreement and allows you to exercise the rights recognized by the said Agreement.
The electronic residence document is valid for 5 years (bearing the title "residence card") or 10 years (bearing the title "permanent residence card") if the right of permanent residence is acquired (legal and uninterrupted residence in Italy for 5 years, including periods of stay before or after 31st December 2020).
The electronic residence document is issued by the Police Headquarters (Questura) of the province where the UK national resides. On the Questura website, a dedicated electronic channel allows you to book an appointment to submit your application.
UK nationals registered in the population register (iscritti in anagrafe) by 31st December 2020, starting from 1st January 2021, are invited to report in person to the Immigration Office of the Police Headquarters (Questura)in the province of residence to request the electronic residence document.
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.
There is a specific immigration website that gives you up to date information on how to apply.
The Italian National Police Force also have a decent website, that you can read in English that explains all the procedure.