You change your money at the airport when you arrive and also when you leave, but there is a minimum amount they will change back so check - I think it is about £10 - we ended up wandering around trying to spend what we had left, and came home with a selection of leather purses! If you do not like haggling for your purchases, go to the Artisan type shops, where there is a fixed price. We were in Marrakesh in September, and there are several quite near the centre.
A little tip, there is a good tourist red double decker bus which travels around in a large circle, two routes, on which you can get either a one day or a two day ticket. With this you can jump on and off at all the tourist stops, well worth doing. There is a stop straight outside McDonalds, and in there you can get clean toilets and cool drinks.!