The main restriction a tourist will encounter is the prohibition on visiting mosques, unless you are Muslim. This is unfortunate since much of the most beautiful artistry in the country is inside these mosques. There are certain historic mosques which allow visitors and you should check for these wherever you visit. If you visit during the month of Ramadan when the faithful fast each day until sunset, you are likely to have a somewhat different experience than a visit at other times of the year. However, you won't be expected to fast, and in most larger towns and cities you'll find places to eat during the day.
Morocco is by far one of the more liberal Islamic countries.
They do allow the sale and consumption of alcohol, but it is strictly controlled, and expensive. Hotel bars and upscale restaurants will almost always serve alcohol. You'll find many of the less than faithful getting drunk. It seems that the forbidden nature of booze tends to make them overindulge, with the cost being the only limiting factor to their consumption. These Moroccans are either the young or westernized.