From the US and Europe Marrakech can easily be reached by air. Royal Air Morocco has direct flights from the US to Casablanca. There are plenty of flights each day from Casablanca to Marrakech. British Airways and other carriers have direct flights to Marrakech from London and other European Airports.
You want to calculate at least one full day of travel time if you are coming from the US. Not only is there a 5, 6 or 8 hr time shift (depending from where in the US you start out); but also you can expect always delays and missed flights on your way there. We learned to have plenty of transfer time between flights ( 2hrs at least!!) and to avoid the main hubs of JFK and London Heathrow (even though it will not be possible at times). Our travel time to get there was a full 24 hrs. and the trip back to Chicago was also 16 hrs. long.
The Moroccan immigration and customs officers are fairly friendly and US citizens, who do not need a visa for this country, should have no issues getting through the customs checkpoint. You'll find that the Morrocans have no real appreciation for building lines. They just hop in front of you whenever they can. So don't be too polite, you might end up on the end of the line.