We encounter many kinds of mystical beings in The Arabian Nights — angels, mermaids, dæmons at Satan himself. But the jinn are the most prevalent and the most strongly identified with these stories.
But what is the difference between a jinni, an ‘ifrit and a marid? Researching the issue online did not present a clear cut answer, so I posted a question on Quora.
The most complete answer came from David Beier, who wrote:
in some traditions the words “Ifrit” and “Marid” are used interchangeably with the word “Jinn” or “Jinni.” In other traditions “Ifrit” and “Marid” are just two of several different races or tribes of Jinn (this tends to be the most common belief). Finally, there are other traditions in which they are distinct magical creatures who are not Jinn.
An Ifrit is normally thought of as a type of Jinn which is linked to fire and is easily angered. They are usually portrayed as bringers of destruction and very dangerous. Some traditions use the word interchangeably with “demon” though others suggest that they are different than the always-evil “Shayatin.” They are also sometimes linked to the underworld.
A Marid is usually considered a type of Jinn which is elementally linked to water. Some traditions always suggest that they are the most powerful tribe of Jinn, capable of great magic. Wish-granting Jinni’s like the ones you might see in Aladdin are often thought to be Marids.
David also recommends Islam, Arabs, and the Intelligent World of the Jinn by Amira El-Zein (Syracuse University Press, 2017), and offers the following summary:
Some actually theorize that the different Jinn were once demigods or minor deities worshiped by different pagan tribes in the region. This theory posits that Islam essentially absorbed entities in the same way that Christianity absorbed aspects of Christmas from Pagan traditions. This would perhaps explain why the different tribes of Jinn (Marid, Ifrit, Sill’at, Ghoul, Jann, Shiqq, Nasnas, ect) are sometimes thought of as different magical creatures.