Greetings depend on the time of day. Say “buongiorno” (good day) until roughly midafternoon–the exact time varies between regions and generations–after which you should switch to “buonasera” (good evening). When you leave, say “arrivederci.”
Remember that “ciao” is an informal greeting. Although you will be forgiven if you are a tourist, saying “ciao” to someone elderly or in a position of responsibility such as a police officer is considered impolite. “Salve” is a more formal greeting that can be used with anyone at all times of day!
“Piacere” means nice to meet you, “per favore” is please and “grazie mille” is thank you very much.
You might need “mi dispiace” (I’m sorry), “non capisco” (I don’t understand), and “scusi” (excuse me), too.