Anyone can enter the cemetery and wander around and explore the old tombs. Men will be given a skull cap to wear as a mark of respect, and just leave a small donation (10-20 dhs) for the man in charge as you leave. There is a tradition of washing your hands before leaving the cemetery and this can be done at a small fountain beside the entrance. Morocco used to have a significant Jewish population of several thousands but nowadays it has dropped to around 200, of which only a handful still live in the Mellah quarter.
You can visit the official website of the Jewish Cemetery here: Marrakech Jewish Cemetery