Muqarnas are unique to Islamic architecture. Their purpose is to create a smooth transitional zone in a variety of architectural settings.
They don't have a structural function. Muqarnas can be considered as three dimensional version of the more common two dimensional Islamic geometric design: the design techniques are surprisingly similar.

Shrine of Sheikh Abd al-Samad in Natanz, Iran
How to Build a Muqarnas
Learn how to build a simple muqarnas composition in cardboard. In this video tutorial I show how, step-by-step, you can make an Iranian style muqarnas. Tools and materials needed: three different colours mounting cardboard, exacto cutting knife, pins, pair of compasses, a ruler and pencil. Give it a go!
Pinterest muqarnas board
Useful website
A valuable resource on muqarnas, created by by Shiro Takahashi. It has dozens of photos of muqarnas compositions across the Islamic world, with corresponding plan drawings. The most comprehensive muqarnas database online
http://www.tamabi.ac.jp/idd/shiro/muqarnas/
Below is an example of a wooden muqarnas composition made of vertical triangular sections. See more of this process on this website: www.taujel.com
Two Main Types of Muqarnas
All photos and work by Abdelghani Nhari
Two videos from the Abdelghani Nhari's workshop
Photos courtesy of Ali Reza Sarvedalir