Salam means “Peace”. It’s like saying ‘Hi!’ – It is the most shortened version of the Islamic greeting (Assalamu Alaikum wa rahmatullahi wa barakatuh) and originates from the hebrew greeting ‘Shalom’.
If someone says Salam to you, you should return the greeting by saying Salam back, or Wa Alaikum As-Salam (and upon you be peace).
Abu Hurairah narrated that the Prophet Muhammed (pbuh) said: “Allah created Adam from dust after He mixed the clay and left him for some time until it became sticky mud, after which Allah shaped him. After that Allah left him till it became like potter’s clay [a sounding clay]. Iblis used to go past him saying ‘You have been created for a great purpose.’ After that Allah breathed His spirit into him. The first thing into which the spirit passed was his eye and then his nose. He [Adam] sneezed. Allah said: “May your Lord have mercy upon you, O Adam! Go to those angels and see what they would say.’ So Adam went and greeted them. they replied saying: “Peace be upon you and the mercy and blessings of Allah.” Allah said: “O Adam! This is your greeting and that of your offspring.” (Sahih Bukhari).
This is the origin of saying as-Salamu-Alaykum Wa Rahmatullahi Wa Barakatuh (peace, mercy and blessings be upon you) when we greet each other; as-Salamu-Alaykum is the shorter verion of this. The Prophet Muhammed (SAW) re-established this wonderful tradition among the Muslims.