Although the origins of coffee-drinking are shrouded in mystery (like most things), it is fairly certain that European trade with points east and south brought the stimulating drink to our attention. And who was better in trade in the late Middle Ages and Renaissance than the Venetians? Coffee was thus introduced to the West via Venice in the 16th century, and became the rage there, as the pleasure-loving inhabitants of the city quickly took to it. By the middle of the next century, the coffee habit was so well-established that local dramatist Carlo Goldoni set one of his plays, La Bottega del caffe', in a coffeehouse, already seen as a social center. As Starbucks sort of is now. But they don't have Starbucks in Italy.
How to order a coffee in Italy? First of all, don't ask for an espresso. That is coffee in Italy. Just say un caffe'/un caffe' per me/mi fa un caffe'?/se mi fa un caffe'. Now. On to the variations. Coffee can be lungo or ristretto, respectively, made with more or less water. It can also be corretto, which means that liquor is added- they may ask, corretto grappa o cognac? (the two standard additions). May I personally suggest the grappa? Although I rarely drink grappa on its own, due to its similarity to kerosene, I rather like it with my coffee when I'm in Northern Italy in the winter. Nobody will bat an eyelash there (especially in the Veneto) if you order a caffe' corretto even in the morning. It's cold and damp, dammit. If you want decaf, ask for a decaffeinato or Hag (a brand name). Cold coffee can be had, called caffe' freddo, but it will not normally have ice in it. The Italians are not big on ice.
Now for the milk and stuff. If it merely has the addition of milk, it is called a macchiato (literally, "stained"). You don't have to say caffe', just un macchiato. It will have a bit of steamed milk on top. Coffee and milk (usually a kids' drink in Italy) is called caffelatte. Don't say latte, that just means "milk". Cappuccino is of course the famous yummy coffee and milk with the frothy foam; if you want to sound like a native and impress your companions, try calling it a cappuccio. Cappuccino and caffelatte are not drunk by Italians after mid-morning, but as you are a tourist you can do whatever you want. If you want a cappuccino in the afternoon, go for it. Not to be neglected is caffe' con panna, coffee with whipped cream.
The above varieties can be had at a bar (see here for a description) at all hours. Remember that you will pay extra if you drink sitting down as opposed to at the counter- Italians do not linger as long over their coffee, and will often just down it in one swig and take off. On the other hand, they don't walk or drive around with paper cups of coffee in their hand like some nationalities I could mention. Traditionally it is also served after meals, especially lunch. This is your time to loll about.
Brands to choose, if you have a choice? I like Lavazza and Illy.
(in the photo, famed Neapolitan comedians Peppino De Filippo and Toto' having some coffee at the counter)