By train
ONCF trains run from Casa-Voyageurs to Marrakech roughly every two hours, taking about 2 hours 40 minutes. If you are arriving at Mohammed V Airport, take the airport train to Casa-Voyageurs (or to Ain Sebaa) and change there. Marrakech station is in Gueliz, about 2 km from Jemaa el-Fnaa; petit taxis wait outside.
By bus
CTM and Supratours buses take around 3.5 hours and are slightly cheaper than the train.
By car
The A7 toll motorway connects the two cities in about 2.5 to 3 hours. Note that cars cannot enter most of the Marrakech medina, so check parking with your riad.