Moroccan taxis take two forms: petits taxis, small taxis that travel within city limits, and grands taxis, large taxis that travel between cities. Drivers usually wait until the taxi is full before departing.
Petits taxis are color-coded according to city—in Casablanca and Fez they're red, in Rabat they're blue, in Marrakesh they're beige, and so on. These can be hailed anywhere and take a maximum of three passengers. The fare is metered and not expensive: usually 5 DH to 30 DH for a short or medium-length trip. Taxis often pick up additional passengers en route, so if you can't find an empty cab, try hailing a taxi with one or two passengers already.
Grands taxis travel fixed routes between cities and in the country. One person can sit in front with the driver, and four sit, very cramped, in the back. Don't expect air-conditioning, a luxurious interior, or even fully functioning windows. Fares for these shared rides are inexpensive, sometimes as little as 5 DH per person for a short trip. You can also charter a grand taxi for trips between cities, but you need to negotiate a price in advance.