The Genie (Djinn) comes from Arabian folklore and is a supernatural fiery creature. They can be both good and evil creatures; the evil ones are said to lead humans astray. In popular western culture, Genies are often seen as been concealed with old lamps, which when rubbed a Genie appears out of them. The reason given is that they have been trapped inside the lamp by an evil sorcerer. This description comes from the western translation of "The Book of One Thousand and One Nights". Genies often grant wishes as well to the person that frees them from the lamp, commonly this is three wishes that the Genie can grant.
For the ancient Semites, Genies were spirits of vanished ancient peoples who acted during the night and disappeared with the first light of dawn; they could make themselves invisible or change shape into animals at will. These spirits were commonly believed to be responsible for diseases and for the manias of some lunatics. Different types of Genies include: the ghul (night shade which can change shape), the sila (which cannot change shape), and the ifrit (they are the ones that grant wishes).
The Arabs believed that the Genies were the spirits of fire, although sometimes they associated them with succubi, demons that are in forms of beautiful women.