If you are in an accident and need to call an ambulance then the number to call is 118 (112 is the number for the carabinieri and traffic police).
If you can carry on under your own steam, but need treatment urgently then you need to head for a hospital with a pronto soccorso (Accident and Emergency/Emergency Room). If you can wait, then head for an ambulatorio (doctor's surgery).
In both cases you will need to present your European health insurance card (assuming you are an EU citizen). In my one and only visit to a doctor in Italy, it was all very straightforward.
Charges (for EU citizens)
The chances are you are going to have to pay a ticket sanitario (charge) generally simply referred to as il ticket. You will need to pay a ticket for the visit to a doctor and for any medicines they prescribe. You also have to pay a ticket if you go to a pronto soccorso and your problem is judged to be a codice bianco (Code White - ie a non-emergency). So far as I can tell you shouldn't be charged for the ambulance if it's an emergency.
The system is complicated with each region able to set its own charges, subject to nationally set maximum levels and, inevitably, with the pressure on public budgets, charges are increasing. Some people (eg over-65s) may be exempt. Some charges are reimbursable in Italy (if you go to the office of the ASL - 'Azienda Unità Sanitaria Locale - the local health authority) and some may be reimbursable when you get home depending on your national healthcare system.
There's a little more information (aimed at UK citizens) on the NHS Choices.