Morocco’s official language is Classic Arabic. But, the special Moroccan Arabic dialect is known as Derjia. And this language is spoken widely all over the country. The second unofficial language spoken in Morocco is French. The primary schools in Morocco introduce French in the third year. Though this is not common in remote areas, you will find lots of French-speaking people in the cities. For example, taxi drivers, tourists based restaurants, etc. and guides are quite comfortable to communicate in French.
The local people will definitely appreciate it if you attempt to communicate in Classical Arabic. So, you can try learning some useful phrases before starting the trip. “salamu ‘Alaykum” (peace be upon you) and “insha’Allah” (God willing) are useful to greet the Moroccans as you meet them. Anyways, Arabic and French are not the only options to communicate there.
English is another popular mode of communication in Morocco. The city is full of people who know good English. Especially, the tourist areas, hotel staff, restaurant staff, and tourist companies are skilled enough in English. So, you can easily communicate with them in that language. Also, being a Tourist place, most of the shopkeepers and merchants in Marrakesh and Fez know English. So, you will not face as such any language barrier during your trip to Morocco.