Following is a brief exegesis (tafseer) of Surah Al-Jinn. If you are interested in a thorough discussion on the Islamic viewpoint on Jinns, then Sh. Yasir Qadhi has excellent talks on this topic.
For detailed discussion:
The Reality of Jinn in the Qur’an and Sunnah (Part 1)
The Reality of Sihr (Black Magic), Exorcisms & Jinns (Part 2)
For a brief discussion:
The World of the Jinn & Black Magic
Source: Tafseer Al-Muyassar
Ayah 1 & 2: Say, [O Muhammad], “It has been revealed to me that a group of the jinn listened and said, ‘Indeed, we have heard an amazing Qur’an. It guides to the right course, and we have believed in it. And we will never associate with our Lord anyone.
Commentary: Say, O Messenger, Allah has revealed to me that a group among the jinn listened to my recitation of the Qur’an. Afterwards, they said to their people: We have certainly heard a recitation which is marvelous in its eloquence, rhetoric, wisdom, rulings, and reports. It calls towards to truth and guidance, hence, we have believed in it and acted in accordance to it. We will never [from now on] associate a partner with our Lord, who created us only for His worship.
Ayah 3: And [it teaches] that exalted is the nobleness of our Lord; He has not taken a wife or a son.
Commentary: The Greatness and Majesty of our Lord are exalted. He has [certainly] not taken a wife nor a child.
Ayah 4: And that our foolish one has been saying about Allah an excessive transgression.
Commentary: Our foolish one, meaning Iblees (Satan), was saying against Allah the Exalted [something] far from the truth by claiming that He has a wife or a child.
Ayah 5: And we had thought that mankind and the jinn would never speak about Allah a lie.
Commentary: We never thought that anyone would ever lie against Allah, whether among humans or jinns, by attributing to Him a wife or a child.
Ayah 6: And there were men from mankind who sought refuge in men from the jinn, so they [only] increased them in burden.
Commentary: Men among mankind used to seek refuge/protection in men among the jinn. But the latter [only] increased mankind in fear, terror, and horror. This act of seeking refuge in other than Allah is something which Allah rebuked the people of ignorance for and is [a form of] major shirk, which He does not forgive except through sincere repentance to Him. In this ayah is a severe warning against resorting to magicians, charlatans, and their likes.
Ayah 7: And they had thought, as you thought, that Allah would never raise anyone [after death].
Commentary: And the disbelievers among mankind thought as you thought, O [fellow] Jinns, that Allah would never raise anyone after death. [Some interpreted this ayah to mean that they thought that Allah would never send anyone as a Messenger].
Ayah 8: And we have sought [to reach] the heaven but found it filled with powerful guards and burning flames.
Commentary: And [remember], O fellow Jinns, [that] we used to seek to reach the heaven so that we may listen to the speech of its people [i.e. angels]. However, we now find it filled with many angels who guard it with burning meteors that they throw at anyone who approaches [uninvited].
Ayah 9: And we used to sit therein in positions for hearing, but whoever listens now will find a burning flame lying in wait for him.
Commentary: Before, we used to take seats [near] the heaven so that we may listen [secretly] to the discussions [of the angels], but whoever tries to eavesdrop now will find a meteor [thrown at him], which will burn and destroy him.
Ayah 10: And we do not know [therefore] whether evil is intended for those on earth or whether their Lord intends for them a right course.
Commentary: We do not know, O fellow Jinns, [why such things are taking place and] whether Allah wants evil to be sent down to the people of earth or that He intends for them goodness and right guidance.
Ayah 11: And among us are the righteous, and among us are [others] not so; we were [of] divided ways.
Commentary: From among us are those that are righteous and God-Fearing. And from among us are also those who are disbelievers and transgressors. We are divided and [follow] different ways.
Ayah 12: And we have become certain that we will never cause failure to Allah upon earth, nor can we escape Him by flight.
Commentary: We [the Jinn] realize that Allah is competent over us and that we are in His grasp and [under] His authority. Hence, we can never escape His command wherever we may be and we can never slip from His punishment [by] escaping into the sky.
Ayah 13: And when we heard the guidance, we believed in it. And whoever believes in his Lord will not fear deprivation or burden.
Commentary: So when we heard the Qur’an [being recited by the Prophet Muhammad (pbuh)], we believed in it [immediately]. And we acknowledged that it is the truth from Allah. Therefore, whoever believes in His Lord, then he does not fear a decrease in his good deeds nor an unjust increase in his evil deeds [on the day of judgment].
Ayah 14 & 15: And among us are Muslims [in submission to Allah ], and among us are the unjust. And whoever has become Muslim – those have sought out the right course. But as for the unjust, they will be, for Hell, firewood.
Commentary: Among us Jinns are those who are submissive and obedient to Allah. And among us are also the unjust wrong doers, who have departed from the true path. So whoever accepted Islam and submitted himself to Allah through obedience, then he is on the true path. [Such people] struggled in their choice [to find the truth], so, Allah guided them to it. As for those who were unjust [to themselves by turning away] from Islam, then they are fuel for Hell.
Ayah 16 & 17: And [Allah revealed] that if they had remained straight on the way, We would have given them abundant provision. So We might test them therein. And whoever turns away from the remembrance of his Lord He will put into arduous punishment.
Commentary: If the disbelievers among mankind and jinn were to follow the path of Islam and didn’t deviate from it, then We would send down upon them abundance water and expand their sustenance in the world in order to test how they would be grateful for the blessings of Allah upon them. But whoever turns away from the obedience of his Lord, listening to the Qur’an and reflecting on it’s meaning, and acting in accordance to it, then he will be entered into a severely painful punishment.
Ayah 18: And [He revealed] that the masjids are for Allah, so do not invoke with Allah anyone.
Commentary: The mosques are [established] for the worship of Allah [alone], so do not worship in them anyone other than Him. And sincerely worship and supplicate to Him in them. In this ayah is an obligation to free the mosques from anything that may taint the sincerity towards Allah or following His Messenger Muhammad (pbuh).
Ayah 19: And that when the Servant of Allah stood up supplicating Him, they almost became about him a compacted mass.
Commentary: When the Prophet Muhammad (pbuh) stood worshiping His Lord, the jinn were almost upon him piled up in groups, some of them over others, from their overcrowding to listen to the Qur’an from him.
Ayah 20: Say, [O Muhammad], “I only invoke my Lord and do not associate with Him anyone.”
Commentary: Say, O Messenger, to these disbelievers, “I only worship my Lord alone and do not associate with Him anyone in worship.”
Ayah 21, 22, & 23: Say, “Indeed, I do not possess for you [the power of] harm or right direction.” Say, “Indeed, there will never protect me from Allah anyone [if I should disobey], nor will I find in other than Him a refuge. But [I have for you] only notification from Allah , and His messages.” And whoever disobeys Allah and His Messenger – then indeed, for him is the fire of Hell; they will abide therein forever.
Commentary: Say, O Messenger, to them: “I do not have the power to remove harm from you nor can I bring you benefit. I can never save myself from the punishment of Allah if I disobey Him nor can I ever find refuge [from] other than Him [so] I flee to Him from His punishment. But I [only] inform you from Allah what He commanded me to inform. He sent me with His message to you.” Therefore, whoever disobeys Allah and His Messenger and turns away from the religion of Allah, then his recompense is the fire of Hell from which he will never be taken out.
Ayah 24: [The disbelievers continue] until, when they see that which they are promised, then they will know who is weaker in helpers and less in number.
Commentary: When those who associate partners with Allah see what they were promised of the punishment [with their own eyes], then they will come to know who is the weaker helper and the least in troops. [Meaning: those who associate partners with Allah have no helper at all and they are fewer in number than the soldiers of Allah. They will realize this on the Day of Judgement.]
Ayah 25, 26, 27, & 28: Say, “I do not know if what you are promised is near or if my Lord will grant for it a [long] period.” [He is] Knower of the unseen, and He does not disclose His [knowledge of the] unseen to anyone. Except whom He has approved of messengers, and indeed, He sends before each messenger and behind him observers. That he may know that they have conveyed the messages of their Lord; and He has encompassed whatever is with them and has enumerated all things in number.
Commentary: Say, O Messenger, to these people who associate partners with Allah: “I do not know whether the punishment which you are promised is close at hand or my Lord will give it after a long time.” Allah is free from any imperfection and He is the Knower of that which is hidden from sight. He does not make apparent His knowledge of the unseen to anyone from His creation except the one whom He chooses for His message and from His favor. He lets know some of the unseen to such a chosen prophet. And He sends angels in front and behind the Messenger to protect him from the jinn so that the latter do not eavesdrop on the Messenger and whisper [the stolen information] to the soothsayers. Muhammad (pbuh) knows that messengers before him faced similar circumstances as him by preaching the truth and that he is protected as those messengers before him were protected from the jinn. Allah encompasses in His knowledge all that is with them, whether apparent or hidden, and nothing escapes from His knowledge. He has enumerated all things in number, hence, the Messenger does not fear anything from them [because he knows Allah is protecting and watching over him].