The Morocco Foreign Ministry maintains a list of countries that do not require a visitor visa. Please see: Visitor Visa Requirements listed by Country
How to apply & requirements
If you require a visa, download the visa application form. See: Visa Application Form
You must submit your application along with any other required documents at your local Morocco embassy (see link below).
Additionally, you may be required to apply for a resident permit (the embassy will advise you on this).
Please contact your local embassy for further application guidelines, documents you require and for a full list of other requirements. See: List of Morocco Embassies