What exactly gets copied
You cannot post your passport abroad, and no office will stamp the booklet itself. What travels is a copy that someone official has declared true, a copia conforme. Usually that means the photo page of a passport, or both sides of an identity card. Ask the reader which pages they want, because a partial copy is the usual reason a file comes back. That is the real start of how to legalize a Government-Issued ID Copy.
Who can certify the copy
In Florence the town hall can certify that a copy matches the paper you show at the desk. Bring the original, because the clerk has to see it. A notary can do the same job, and some readers abroad prefer that. Either way you then legalize a Government-Issued ID Copy in Florence through the state chain.
Which state desk stamps it
A town-hall copy is an administrative act, so the Prefettura stamps it. Where a notary certified the copy instead, it is a notarial act and the Procura della Repubblica at the court takes it. That single choice at the start decides which door you knock on later. The embassy legalization of a Government-Issued ID Copy in Florence runs from whichever of the two stamped it.
The original has to be in date
An expired passport or card is a dead end. Missions want a copy of a document that is valid on the day they see it, and a lapsed one is handed back. Check the expiry before you queue for the copy, not after. If yours runs out soon, renew first, then copy. The consular legalization of a Government-Issued ID Copy in Italy is wasted on a book that lapses next month.
Cost and days
The copy itself carries a small charge at the town hall, and the state stamp needs a €16 marca da bollo. The mission of the receiving country then charges its own fee. Reckon on 10–15 business days for the whole run, or 3–5 on the express route. Since an identity copy is often one sheet in a larger file, line its dates up with the rest.
One question to settle first
Ask the reader before you spend anything. Whether a mission's stamp is needed depends on the country that will read the file, so put the question to the receiving authority in writing. Some take a single-step certification and want nothing further. Others want the copy made by their own mission and will not accept a town-hall one. An embassy attestation of a Government-Issued ID Copy in Florence is only useful once you know which of those you face.