Tangier has been a border town for about three thousand years, and it still has the manners of one. It began as a Phoenician colony, became the Roman town of Tingis, and fell to the Portuguese in 1471. The English got it in 1661 as part of a royal dowry and left in 1684 after wrecking the port. From 1925 to 1956 it was run as the Tangier International Zone by a committee of foreign powers, a tax haven with 85 banks by 1950 and nobody quite in charge. That past drew spies, smugglers and writers. Today it's a port city of more than a million people, and on a clear day Spain is a smudge on the horizon.
It's not a city of big monuments. It's a city of corners: a medina tumbling down to the harbor, a kasbah with a palace garden, a square named after a royal speech, a cliff cafe where Paul Bowles and William Burroughs drank tea. Add two capes to the west, a long city beach and one of Morocco's easiest day trips, Asilah, and three days is the right length. Less and you only see the medina; more and you'll want Chefchaouen.
Day one is the medina, the Kasbah and the port, day two the Grand Socco, the beach and the western capes, day three Asilah. Start on a Wednesday: the Kasbah Museum is closed on Tuesdays, the Grand Socco market is reportedly on Thursday and Sunday mornings, and day three lands on a Friday, couscous day. For the rest of the country see Morocco; the blue town of Chefchaouen and the old capital Fes are the natural next steps.