We arrived in Casablanca on a cruise ship. The port is huuuuge and divided into 3 terminals. Our guide explained us how the port worked and how it was divided, but I didn't take note of everything he said and all I can remember now, as I write, is that there is a terminal for cereals and another for minerals. Casablanca's port is not only the main one in Morocco but also Magreb and North Africa's largest port. Also, it is amongst the biggest artificial ports in the world.
Once the cruise ship docks, there are several options for visiting the town. Walking is not one of them as the main sights are distant from the port terminal. So, if you're going on a cruise you may arrange the visit with the cruise company or prepare to go by your own. We chose the visit organized by the cruise ship company. However, we noticed there were a lot of petit taxis and grand taxis. As with everything commercial in Morocco, you must really bargain with the taxi driver, prices will be much cheaper. Also, if you avoid bargaining as soon as the ship docks (along with everybody else) and wait some time, you may even get a lower price.
I do not know if it is the best way to travel to Casablanca, but we arrived there by ship. I liked this way since I had a unique chance to observe the view of the city from water.
The city is rather big. If you want to see the main sights and have only a day - get in a bus (I mean buy an excursion with a guide) or take a taxi.
Who said Africa was always sunny and hot? Old Cliffie's arrival in the Spanish enclave of Ceuta - which the Spanish refuse to give back to Morocco, so why do they complain if the British do the same about Gibraltar? - was shrouded in a thick fog, that swirled several miles inland. The ferry hooted, the passengers shivered, and the sun finally pierced the fog as old Cliffie reached the land border with Morocco.
Though we did not come in this way, I know that there are ferries and other boats that come from other countries. This one is from Spain, Malaga as I recall.