Italy is not a dangerous country for women to travel in. That said, in some parts of the country, solo women travellers may be subjected to a high level of unwanted attention. Eye-to-eye contact is the norm in Italy's daily flirtatious interplay. Eye contact can become outright staring the further south you travel.
If ignoring unwanted male attention doesn't work, politely tell your interlocutor that you're waiting for your marito (husband) or fidanzato (boyfriend), and if necessary, walk away.
If you feel yourself being groped on a crowded bus or metro, a loud 'che schifo!' (how disgusting!) will draw attention to the incident. Otherwise take all the usual precautions you would in any other part of the world.
You can report incidents to the police, who are required to press charges.