CTM run
buses
to just about everywhere, including Safi, Essaouira, Agadir, Tiznit and various European destinations; tickets and times from the terminal on Rue Léon l'Africain. If you are heading south for Essaouira, the best service is the "Mumtaz Express", which leaves at 5.00pm, arriving 9.30pm at Essaouira; most other services run via El Jadida and/or Safi.
Grands taxis
also run to Rabat, from the main stand.
You'll probably prefer to go by
train
to Rabat, Tangier, Meknes, Fes or Marrakesh. These departures are mainly (but not exclusively) from the Gare des Voyageurs but every train from Gare du Port to the airport passes through Gare des Voyageurs so it's not hard to make a connection.
Regional Air Lines runs a domestic service from Casablanca to Essaouira, Laayoune, Oujda and Tangier, see "Travel Details" for further information