In the Marrakech Menara airport, next to the luggage pick-up place, you will find a few companies selling Moroccan SIM cards (also will need to provide your passport). Last time I saw Orange and Inwi booths. I would go for Orange. Don't forget to insert the new SIM card on the spot and ask for assistance to top it up. More info about SIM cards and the Internet in Morocco can find in my article Stay Online when travelling in Morocco: SIM and Internet.