The Shaitan, which is another name for Satan, is a type of djinn created by fire by Allah. While their behaviour can be moderate to mischievous some members of the djinn have even converted to become good, the Shaitan though is invariably evil.
Iblis is the king of the Shaitan, and, like Iblis, the entire role of the Shaitan is to lead humankind into sin by temptation. They did this by creating illusions in the minds of humans -- enthralling visions of pleasures to be had by committing various sins -- and they are infinitely imaginative.
The Shaitan eat dirt and excrement and have a notable aversion to water. If one forgets to wash after supper and goes to bed with unclean hands, their hands may be licked to bloody stumps by morning. Forgetting morning duties results in tempting thoughts sent by the Shaitans throughout the day. Many of the species look exactly like human beings, although they can shape-shift into animals or inhabit corpses. Some possess people. Some tempt people to do evil. Some take the shape of seductive women to lure travelers, much like the Ghouls of the Arabian Desert.
Like the theory of having a good conscience and an evil conscience. It is also said that each man has his own guardian angel and his Shaitan. In that most favorable aspect, the Shaitan is like the Greek daimon and is said to inspire all great poets. So as a different role, the Shaitan is inspiration itself and is connected to poetry and art. There is a story about one traveler who was on his way through the desert was suddenly seized by two invisible spirits and transported to their leader. They turned out to be Shaitan, and the leader was the composer of a famous poet's work.
There is another account which explains the sudden increase of the Shaitan population. Fishermen in Morocco accidentally released these Shaitan by opening bottles that had the Seal of Solomon on them.
"Once there was a very poor old fisherman who cast his net early one morning and pulled up a strange vessel with a seal on its lead cover. Hoping the vessel might contain something precious, he pried open the lid. A dark smoke arose, slowly at first, and eventually covered all the sky, then formed itself into a massive presence who glared at the old fisherman. "Prepare to die," the spirit said. "I will kill you, and one favor only will I grant you, which is that you choose the method of your death." The fisherman, frozen with fear, asked how the spirit could treat him so, as he had been his liberator. The genie or djinn, who was a Shaitan, answered that he had been sealed in the bottle by King Solomon, whose rule he refused as he had refused the will of heaven, and while in confinement he had first sworn to aid any human who delivered him by giving him riches, making him a monarch, and granting him riches, making him a monarch, and granting him three wishes of any sort. But after three hundred years had passed, he angrily arrived at his current resolution, to give the person only a choice of how he wanted to die.
The fisherman, having recovered his wits, and desperate to save not himself but his family from ruin, spoke quietly to the towering demon: "Do you swear that you were in this vessel, for I cannot believe that such a grand figure as yours ever did fit in such a container. In fact, I cannot even believe your oath but only my eyes, so I could only believe you if you are able to reenter this vessel." The challenged demonic creature dissolved again into smoke and collected himself slowly within the vessel until he was entirely contained. The fisherman clamped the lid shut upon him and cast him into the sea, resolving to warn all other fisherman by his tale to beware of opening any vessel and thus released a wicked spirit."
~ story was taken from A Field Guide to Demons, Fairies, Fallen Angels, And other Subversive Spirits by Carol and Dinah Mack.
Here are a few ways to dispel or disarm the djinn.
The species aversion to fresh water will stop them from all activity. The bone of a hare also works against them. A white rooster will keep the Shaitan away. It is also said that the door can be closed to them at night, for they can't open closed doors. They cannot open water bottles or oil containers that are shut tightly or take the covers off jars, so keeping food enclosed in a sealed vessel keep the demons out. In the case of the fisherman, it was presence of mind that saved the day, and the classic trick of diminishing demons by containing them. This also works in the case of Madame White, and the Naga Karkotak in the case of Yaksas.