Marrakesh’s main airport (Marrakesh Menara) is just six kilometres from the city. For a taxi from the airport to the medina expect to pay at leasy 60dh and more still if you arrive late at night.
The main railway station is in Gueliz on Hassan II. The national railway company is ONCF (oncf.org.ma). Expect to pay at least 10dh for a petit taxi from the station to the medina. There is also a bus that runs the route.
Most long distance buses terminate at the Gare Routiere, including those run by the national bus company CTM. You can walk to the Medina from the station.
Walking is the best way to see the medina and in fact, narrow alleyways mean it is the only way to see much of it.
You can hail petit taxis on the street. Drivers won’t want to put the meter on so it’s always best to agree on a fare before you set off.
You’ll see, or rather smell, the horse drawn carts lining up not far from the Djemaa el-fna. They look tacky and touristy, but they’re actually quite a fun way to get an introduction to the city.