When arriving at the port you'll have the opportunity to change euros for dirham with shady unlicensed currency traders. While it's possible to save a bit of money this way, don't attempt this unless you know what you're doing. If you want to explore this strange colonial relic, head right at the first roundabout to get tothe city's central park. To head straight for the border, from the far side of the roundabout you can get a bus there for 85 cents. The ride is 5-10 minutes.
You can attempt to cross the border by following all the Moroccans who are just walking straight across, but you will most likely be told to go back and get your passport stamped. If you are unlucky enough to reach the border when there is a large queue, be prepared to wait an hour or more. You must fill out a card with information about your visit before you get your passport stamped; there are random people standing around who will give you a card and help you fill it out in exchange for a tip (or just want to know which pocket you keep your passport and valuables in); ignore them and jump ahead of the queue to grab a card from the office.
Once across, the few miles to the large Moroccan city of Nador are easily hitched. This is where you need to get whether you are heading west or south.