Assalaamu alaikum [Peace be to you]
Islam has professed the use of the Islamic greeting when encountering another Muslim or leaving the company of another Muslim because it unifies the hearts and strengthens bonds between Muslims.
The prophet Mohammed -peace be upon him- said, "I swear by the one whose hand my soul is in that you will not enter paradise until you believe. And you won’t be believed until you love one another. May I tell you something, that if you practice it you will love another, spread the SALAM* [Islamic greeting] among you."
This makes it clear to us, that spreading SALAM among Muslims is the first step towards paradise. This is because spreading SALAM leads to increasing the love between our hearts. And the increase of love between our hearts will increase the Iman [faith].*SALAM means peace in Arabic
The prophet -peace be upon him- also said: "O you people, spread salam among you, serve the food [to the poor], behave kindly with your blood relations, and offer prayer at night when others are asleep, and you will enter paradise safely."
One day, a man asked the prophet -peace be upon him-, "what in Islam is the best?" He answered, "To feed [poor] people and to say SALAM to everyone whether you know them or not."
The complete form for the Islamic greeting is b>Assalaamu Alilkum Wa Rahmatullaahi Wa Barakaatuh</b> meaning peace, mercy, and blessings be upon from Allah[God] the Almighty. This is because it's reported that a man came to the prophet -peace be upon him- and said, "Assalamu Alikum.[peace be to you]"
The prophet responded and the man sat down. The prophet said, "Ten rewards*."
Another man came and said, "Assalamu Alikum Wa Rahmatullaah.[peace be to you and God's mercy
" The prophet responded and the man sat down. The prophet said, "twenty rewards."
Then another man came and said: "Assalamu Alakum Wa Rahmatullaahi Wa Barakaatuh [peace be to you and God's mercy and blessings
". The prophet responded and the man sat down. The prophet said, "thirty rewards."*what is a reward?
Allah[God] gives a reward for every good deed done by a person. so ten rewards means "counted as ten good deeds"
When a muslim greets another muslim with the SALAM, this last one has to reply "Wa alaikum assalaam"[and upon you be peace]
or the complete form "Wa alaikum assalaamu wa rahmatullaahi wa barakaatuh"[and upon you be peace and God's mercy and blessing]
The Scholars have agreed that starting with salam is highly recommended. And responding is obligatory because Allah[God] the Almighty said in the Qur'an, (chapter 4, verse 86), what can be translated as, "And when you are greeted with a greeting, greet with a better (greeting) than it or return it; surely Allah takes account of all things."
Now here's a question:
what if I don't say the SALAM when I see other people?
the answer is: it's up to you if you don't want to be polite, get a reward from God or don't want to get people's respect and love. From the Etiquette of Salam in Islam:
The one who comes greets the people that are present.
The one who is riding greets the one who is walking.
The one who is walking greets the one who is sitting.
The smaller group greets the bigger group.
The young greet the elder.
Peace be to you