Ciao is probably the best known Italian greeting in the world. It’s an informal form used at any time of the day, both when you meet and when you leave somebody (it means “hello” as well as “goodbye”). However, as it’s informal you shouldn’t use ciao in a formal situation, i.e. when you use Lei.
But this wasn’t always the case, the word ciao has a Venetian origin, and it comes from s-ciao, which in turns comes from s-ciavo, short for [sono vostro] schiavo (lit. I am your slave!).
On the other hand salve is probably the least known Italian greeting (we never teach it to our students of Italian!) but a very useful one indeed. Salve comes from the Latin verb salvere (lit. to be well, to be in good health). It can be very friendly, e.g. Salve! Come va? (lit. Hi! How’s it going?), but on its own it’s also a polite form of greeting without being too formal. It’s very commonly used as a form of salutation, (in fact the word salutation itself comes from the same root: salute). So for example when you are out walking in the countryside and you meet somebody you don’t know salve is a very good alternative to buongiorno. Like ciao, salve can be used at any time of the day, but salve cannot be used when parting.
So, now it’s time for me to say….CIAO!