If you need to travel within the country, there are several train lines serving major cities. However, the bus remains the least expensive transportation, and local companies cover the whole.
Company ALSA, regular bus lines, allow you to reach towns located a few tens of kilometers from Marrakech.
For greater distances, different providers offer trips to Essaouira, Safi and Agadir and Ouarzazate. The two main companies, Supr@tours and CTM are particularly effective. The first depends on the ONCF, the equivalent of the SNCF.
The bus station is located in Bab Doukkala, and it's in the lobby that you can buy coach tickets.
By visiting taxi stations (there are several, including the main is located next to the Koutoubia Sidi Mimoun and Bab Doukkala), it is possible to call a taxi by agreeing with the driver beforehand on the conditions.
So-called "collective" taxis offer regular lines to cities around Marrakech. Transport conditions some few Spartans of the fact of sharing a taxi with other passengers and they must wait until the car is full to start.
By small groups of a dozen people, made up of individual or group, it is possible to discover points of interest while traveling in a minibus. Delivery usually includes the transport, but also photo stops and the visit of cooperatives. Many agencies exist in the medina and the new city Gueliz. Make sure however to the sustainability of the company to avoid any inconvenience.
Car rental agencies are many. Beside the international brands like Hertz, Sixt, opinion or Europcar, local agencies also offer this service.