Trains are ideal for city hopping. I’d recommend buying first-class tickets because they’re not much more than the second class and it’s well worth it. In first-class, you’ll have a comfortable experience that is comparable to anything you’d find in Europe.
They typically offer snacks, but not a huge variety, so it’s usually better to buy what you like in advance and bring it with you. If you decide to take a night train, get the first-class sleeper tickets.
If you’re a solo female traveler or in a group of girls, you’ll be booked into a female-only cabin. We had a mom with her young child and another single woman in our cabin, and it made for a very relaxed atmosphere.
Generally speaking, trains are comfy. They provide you with a pillow, a blanket, and a bottle of water. Expect them to be quite hot though, especially in summer. Make sure that you stay hydrated and wear lightweight clothing.
For everything else, taxis are the way to go. You can usually negotiate a price beforehand—especially if you’re looking to travel a long distance. Please keep in mind that driving can be quite dangerous in Morocco, so speak up if your driver is driving erratically.