In It you are sending Peace to other person and praying for him from Allah SWT for his blessings. When a person says Assalamu Alaikum then the other person responds Walaikum Assalam which means May Peace Be on you as well. Some people simply says only the word Salam and it means Peace. however the Sunnah way of Prophet Muhamamd SAW is saying complete Salam.
Islam teaches to say the Salam whenever two people meets each other. When we will greet each other In such a great way then it will Increase love among our hearts. In One of the Hadith of Rasool Allah SAW it is said that a Muslim has a right against his fellow Muslim in six ways and one of those right is greeting whenever they meet each other.
So If you want to earn lots of Ajar and also want to win hearts of other always say the Muslim Greeting.