Praise be to Allaah.
The shayaateen are from among the jinn; they are the rebellious ones and the most evil among them, just as the devils among mankind are the rebellious ones and the most evil among them. There are among the jinn, as is the case among mankind, devils who are the rebellious ones and the most evil, kaafirs and evildoers. There are also Muslims among them who are righteous and good. Allaah says (interpretation of the meaning):
“And so We have appointed for every Prophet enemies — Shayaateen (devils) among mankind and jinn, inspiring one another with adorned speech as a delusion (or by way of deception). If your Lord had so willed, they would not have done it; so leave them alone with their fabrications”
[al-‘An’aam 6:112]
The Shaytaan is the father of the jinn according to many scholars. He is the one who disobeyed his Lord and was too proud to prostrate to Adam, so Allaah expelled him and banished him. Other scholars say that the Shaytaan was one of a group of angels who were called al-jinn; he was too proud to prostrate, so Allaah expelled him and banished him. He became the leader of every evildoer and wicked one, every kaafir and wrongdoer. Every person has a shaytaan and an angel with him, as the Prophet (peace and blessings of Allaah be upon him) said:
“There is no one among you but he has with him a constant companion (qareen) from among the jinn and a constant companion from among the angels.” They said, “You too, O Messenger of Allaah?” He said, “Me too, but Allaah has helped me against him (the devil-companion) and he has become Muslim.”
And the Prophet (peace and blessings of Allaah be upon him) said that the Shaytaan inspires man to evil and calls man to evil. There are times when he has control over man's heart and can find out, by Allaah’s decree, what a person intends to do of good or evil. There are also times when the angel has control over a person’s heart. He makes him incline towards good and calls him to good. These are things that Allaah has enabled them to do, i.e., He has enabled the two companions, the jinn-companion and the angel-companion, to do these things. Even the Prophet (peace and blessings of Allaah be upon him) had a shaytaan with him, his constant companion (qareen) from among the jinn, as stated above, in the hadeeth which says that the Prophet (peace and blessings of Allaah be upon him) said:
“There is no one among you but he has with him a constant companion (qareen) from among the jinn and a constant companion from among the angels.” They said, “You too, O Messenger of Allaah?” He said, “Me too, but Allaah has helped me against him (the devil-companion) and he has become Muslim.”
The point is that every man has with him a companion from among the angels and a companion from among the shayateen. The believer suppresses his shaytaan by obeying Allaah and adhering steadfastly to His religion, so he humiliates his shaytaan until he becomes weak and unable to stop the believer doing good or make him fall into evil, except what Allaah wills. The sinner, by his disobedience and evil actions, gives his shaytaan the strength to make him do evil and encourageshim to do evil, and discourage him from doing good. The believer has to fear Allaah and strive against his shaytaan by obeying Allaah and His Messenger, and seeking refuge with Allaah from the Shaytaan. And he should strive to help his angel by obeying Allaah and His Messenger and heeding the commands of Allaah.
The Muslims help their brothers among the jinn to obey Allaah and His Messenger just as they help their human brothers. Humans may help them in some matters without realizing it. They may help them to obey Allaah and His Messenger by teaching and reminding other humans, for the jinn may attend the lessons of humans in the mosques and elsewhere and benefit from them. Humans may also hear some things from the jinn which benefit them; they may wake them up to pray or draw their attention to things which may benefit them or harm them. All of this happens even though the jinn do not make themselves visible to humans. A jinn may make himself visible to some people when pointing them towards something good or something evil. This may happen, although it is rare. Usually they do not appear to humans, although their voices may be heard on some occasions when they wake a person for prayer or tell him of some things. In conclusion, the believing jinn help the believers even though the believers may not realize it, and they love everything good for them. Similarly, believing humans love everything good for their believing brethren among the jinn, and they ask Allaah to give them everything good. They may attend lessons, and they love to listen to the Qur’aan and knowledge, as stated above. The believers among the jinn attend the lessons of humans, at some times and in some lands, and they benefit from the lessons of humans. All of this happens and is well known. This has been clearly stated by many of the scholars whom the jinn contacted and asked about some issues; they told them that they had attended their lessons. All of this is well-known, and Allaah is the One Whose help we seek.
Allaah has told us that the jinn listened to the Qur’aan from the Prophet (peace and blessings of Allaah be upon him). At the end of Soorat al-Ahqaaf, He says (interpretation of the meaning):
“And (remember) when We sent towards you (Muhammad) a group (three to ten persons) of the jinn, (quietly) listening to the Qur’aan. When they stood in the presence thereof, they said: ‘Listen in silence!’ And when it was finished, they returned to their people, as warners.
They said: ‘O our people! Verily, we have heard a Book (this Qur’aan) sent down after Moosa (Moses), confirming what came before it, it guides to the truth and to the Straight Path (i.e. Islam)”
[al-Ahqaaf 46:29-30]
And Allaah revealed other aayahs in a separate soorah, where He says:
“Say (O Muhammad): “It has been revealed to me that a group (from three to ten in number) of jinn listened (to this Qur’aan). They said: ‘Verily, we have heard a wonderful Recitation (this Qur’aan)!” [al-Jinn 72:1]
Many books have been written on this matter. Ibn al-Qayyim (may Allaah have mercy on him) mentioned a great deal on this topic in his books. There is also a book by one of the scholars entitled al-Marjaan fi Bayaan Ahkaam al-Jaan, by al-Shibli, which is a useful book. There are other books written on this topic as well. You can look for them and ask for them in any bookstore. You could also read the books of Tafseer and learn from the commentary on Soorat al-Jinn and the other aayahs from Soorat al-Ahqaafand elsewhere which speak of the jinn. You can learn a lot from what the mufassireen (may Allaah have mercy on them) said about the jinn, both the good and the bad among them.