Usually the name of a people comes from some very simple word, in fact the name of the Slavs come from slovo which meant word. This makes us believe that they identified themselves as a speech community and called the Germans nemac ‘numb’. (The story of the barbarian is very similar).
Since these people were mostly slaves in the Middle Ages, their name came to mean slave in Medieval Latin: sclavus ‘Slavic’ > servus ‘servant, slave’.
There was a greeting in Latin: servus humillimus domini ‘I am a humble servant of the Lord’. This of course got shortened over the years to servus and up to this day in many languages it’s used as a salutation, mostly in Central and Eastern Europe.
In Italian the Latin word was slightly changed, schiavo, but they also had the habit of declaring themselves slaves as a greeting: sono vostro schiavo ‘I am your servant’. Such long sentences always have the same fate, they get shortened to the point that they are unrecognizable: ciao.
In Italian the word can be used as an informal/neutral greeting as well as a goodbye while in the Americas it only means bye.
Also in English it only means good bye and it’s always nice to mix up the usual byes and see yous with something different. Bear in mind though, that etimologically speaking, you are declaring yourself a slave.
Sources and further reading:
Mark Forsyth: The Etymologicon