The formal Arabic greeting is السَلامُ عَلَيكُم (al-salāmu ʿalaykum, pronounced “as-salamu alaykum,” because recall that “s” is a “sun letter” and thus assimilates the “l” sound of the definite article), meaning “Peace be upon you.” The response has a short form and a long form. The short form is وَ عَلَيكم السَلام (wa ʿalaykum al-salām), “and upon you be peace,” and the long form starts with that but also adds وَ رِحْمة الله وَ بَرَكَتُهُ (wa riḥmat Allāh wa barakatuhu), “and God’s mercy and forgiveness.” Regional variations in exact phrasing, and certainly in pronunciation, will be encountered. Egyptians tend to pronounce the definite article more like “el” than “al,” for example, and in some parts of West Africa you’ll hear something like “as-salam ‘leykum.”
There are a couple of less formal greetings: مَرْحَباً (marḥaban, though the formal final vowel is usually dropped and it is pronounced “marhaba”), or (more completely) مَرْحَباً بكُم (marḥaban bikum), can mean “welcome” but really is “hello.” You can reply with the same word. “Welcome” is better and more commonly translated as آهلاً وَ سهلاً (ahlan wa sahlan), to which the proper reply is أهلاً بكُم (ahlan bikum). You may also just hear ahlan alone, in which case reply back with same. One might even encounter آلو (ālū), but this is usually reserved for use on the phone and not used in person. Pronunciations will vary regionally.
The formal goodbye is مَع السَلامة (maʿ al-salāmah), meaning “with peace,” and the reply is either to repeat that phrase or to say في أمانِ الله (fī amān Allāh, pronounced “fee-aman-illah” because there’s a final short vowel on “aman” that elides into the next word), meaning “in God’s protection.” Other options include وَداعاً (wadāʿan) or الوَداع (al-wadāʿ), meaning “farewell,” and إلى اللِقاء (ilá al-liqāʾ), literally “to the encounter,” but meaning “so long” or “until next time.”
We’ll talk about time sensitive greetings, like “good morning” and “good night,” later.