The easiest way to get from Marrakech to Ouarzazate, is to take the bus from Baby dakal bus station to Ouarzazate but if you want something more comfortable, you can travel with CTM. Maybe there is a bus each hour. Please check their website for more information
The Bus from Marrakech to Ouarzazate is safe and quite simple to take. You must comprehend that what divides Marrakech from Ouarzazate is the Atlas Mountains Range both cities are just 200km away. The trip takes around 5 hours by bus and 4 hours by private car.