Jahannam (Hellfire) is not eternal for all those who enter it. Some stay in there forever and ever, and some are admitted into Jannah after they have fulfilled their punishment period. Satan is of the group that stays there forever and ever. It follows that Jahannam is eternal.
Eternity in Hellfire
There are numerous verses about a group of people staying in Jahannam eternally without ever leaving. For instance, Qur'an 2:167 says: "Those who followed will say, 'If only we had another turn [at worldly life] so we could disassociate ourselves from them as they have disassociated themselves from us.' Thus will Allah show them their deeds as regrets upon them. And they are never to emerge from the Fire." Likewise, there are verses that those who are admitted into Jannah will not leave. For instance, Qur'an 15:48 says: "No fatigue will touch them therein, nor from it will they [ever] be removed."
Allah further informs us that there will be no repentance accepted in Jahannam. Those in there will want to get out but will not be allowed to:
يُرِيدُونَ أَن يَخْرُجُوا مِنَ النَّارِ وَمَا هُم بِخَارِجِينَ مِنْهَا ۖ وَلَهُمْ عَذَابٌ مُّقِيمٌ
They will wish to get out of the Fire, but never are they to emerge therefrom, and for them is an enduring punishment.
— Surat Al-Ma'idah 5:37
Satan is in Hellfire
As for Satan:
إِذْ قَالَ رَبُّكَ لِلْمَلَائِكَةِ إِنِّي خَالِقٌ بَشَرًا مِّن طِينٍ فَإِذَا سَوَّيْتُهُ وَنَفَخْتُ فِيهِ مِن رُّوحِي فَقَعُوا لَهُ سَاجِدِينَ فَسَجَدَ الْمَلَائِكَةُ كُلُّهُمْ أَجْمَعُونَ إِلَّا إِبْلِيسَ اسْتَكْبَرَ وَكَانَ مِنَ الْكَافِرِينَ ـ قَالَ يَا إِبْلِيسُ مَا مَنَعَكَ أَن تَسْجُدَ لِمَا خَلَقْتُ بِيَدَيَّ ۖ أَسْتَكْبَرْتَ أَمْ كُنتَ مِنَ الْعَالِينَ ـ قَالَ أَنَا خَيْرٌ مِّنْهُ ۖ خَلَقْتَنِي مِن نَّارٍ وَخَلَقْتَهُ مِن طِينٍ ـ قَالَ فَاخْرُجْ مِنْهَا فَإِنَّكَ رَجِيمٌ وَإِنَّ عَلَيْكَ لَعْنَتِي إِلَىٰ يَوْمِ الدِّينِ ـ قَالَ رَبِّ فَأَنظِرْنِي إِلَىٰ يَوْمِ يُبْعَثُونَ ـ قَالَ فَإِنَّكَ مِنَ الْمُنظَرِينَ إِلَىٰ يَوْمِ الْوَقْتِ الْمَعْلُومِ ـ قَالَ فَبِعِزَّتِكَ لَأُغْوِيَنَّهُمْ أَجْمَعِينَ إِلَّا عِبَادَكَ مِنْهُمُ الْمُخْلَصِينَ ـ قَالَ فَالْحَقُّ وَالْحَقَّ أَقُولُ لَأَمْلَأَنَّ جَهَنَّمَ مِنكَ وَمِمَّن تَبِعَكَ مِنْهُمْ أَجْمَعِينَ
[So mention] when your Lord said to the angels, "Indeed, I am going to create a human being from clay. So when I have proportioned him and breathed into him of My [created] soul, then fall down to him in prostration." So the angels prostrated — all of them entirely except Iblees; he was arrogant and became among the disbelievers. [Allah] said, "O Iblees, what prevented you from prostrating to that which I created with My hands? Were you arrogant [then], or were you [already] among the haughty?" He said, "I am better than him. You created me from fire and created him from clay." [Allah] said, "Then get out of Paradise, for indeed, you are expelled and indeed, upon you is My curse until the Day of Recompense." He said, "My Lord, then reprieve me until the Day they are resurrected." [Allah] said, "So indeed, you are of those reprieved until the Day of the time well-known." [Iblees] said, "By your might, I will surely mislead them all except, among them, Your chosen servants." [Allah] said, "The truth [is My oath], and the truth I say — [that] I will surely fill Hell with you and those of them that follow you all together."
— Surat Sad 38:71-85
The verses above show that Satan is a disbeliever, that he is cursed, and that he will enter Jahannam. As per Islam Q&A 175522 — If a person commits a sin for which he deserves to be cursed, can he repent? Is it possible for Allah to forgive him?, disbelievers who are cursed do not leave Hellfire. Therefore, Satan will be in Jahannam forever and ever. See also Islam Q&A 6297 — Will Iblees enter Hell, and why?.
Two groups in Hellfire and one group will emerge
There is no known disagreement that those who stay eternally in Jahannam are those who commit shirk by associating partners to Allah. Any other sin, Allah may forgive as He wills:
إِنَّ اللَّهَ لَا يَغْفِرُ أَن يُشْرَكَ بِهِ وَيَغْفِرُ مَا دُونَ ذَٰلِكَ لِمَن يَشَاءُ وَمَن يُشْرِكْ بِاللَّهِ فَقَدْ ضَلَّ ضَلَالًا بَعِيدًا
Indeed, Allah does not forgive association with Him, but He forgives what is less than that for whom He wills. And he who associates others with Allah has certainly gone far astray.
— Surat An-Nisa' 4:116
Furthermore, there is no known disagreement that those who are forgiven will have their punishment lifted and will be admitted into the Jannah:
دَّثَنَا جَابِرُ بْنُ عَبْدِ اللَّهِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى
الله عليه وسلم: إِنَّ قَوْمًا يُخْرَجُونَ مِنَ النَّارِ يَحْتَرِقُونَ
فِيهَا إِلاَّ دَارَاتِ وُجُوهِهِمْ حَتَّى يَدْخُلُونَ الْجَنَّةَ
Jabir b. 'Abdullah reported: The Messenger of Allah (ﷺ) said: "Verily
people would be brought out from the Fire, and they would be burnt
except the exterior (surfaces, fronts) of their faces; and they would
enter Paradise."
— Sahih Muslim, Book 1, Hadith
380
The stance of the last person to enter Jannah after emerging from Jahannam was the subject of a question from Mussa ﷺ to Allah, and a hadith that the Prophet ﷺ reported to his companions:
عَنْ عَبْدِ اللَّهِ، قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم
إِنِّي لأَعْرِفُ آخِرَ أَهْلِ النَّارِ خُرُوجًا مِنَ النَّارِ رَجُلٌ يَخْرُجُ مِنْهَا زَحْفًا فَيُقَالُ لَهُ انْطَلِقْ فَادْخُلِ الْجَنَّةَ - قَالَ - فَيَذْهَبُ فَيَدْخُلُ الْجَنَّةَ فَيَجِدُ النَّاسَ قَدْ أَخَذُوا الْمَنَازِلَ فَيُقَالُ لَهُ أَتَذْكُرُ الزَّمَانَ الَّذِي كُنْتَ فِيهِ فَيَقُولُ نَعَمْ . فَيُقَالُ لَهُ تَمَنَّ . فَيَتَمَنَّى فَيُقَالُ لَهُ لَكَ الَّذِي تَمَنَّيْتَ وَعَشَرَةُ أَضْعَافِ الدُّنْيَا - قَالَ - فَيَقُولُ أَتَسْخَرُ بِي وَأَنْتَ الْمَلِكُ
قَالَ فَلَقَدْ رَأَيْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم ضَحِكَ حَتَّى بَدَتْ نَوَاجِذُهُ
It is narrated on the authority of Abdullah b. Mas'ud that the Messenger of Allah (may peace be upon him) said:
I recognize the last of the inhabitants of Fire to be taken out thereof. A man will come out of it crawling. It will be said to him: Go and enter Paradise. He (the Holy Prophet) said: He would go there to enter Paradise, but would find persons who have already occupied all its apartments. It would be said to him: Do you recall the time when you were in it (in the Hell)? He would say: Yes. It would be said to him: Express any desire. And he would express the desire. It would be said to him: For thee is that which thou desireth and ten times the world (worldly resources). He (the Holy Prophet) said: He would say: Art Thou making a fun of me, though Thou art the King?
I saw the Messenger of Allah laugh till his front teeth were visible.
— Sahih Muslim, Book 1, Hadith 369
There are numerous hadiths to the same effect. See Jami' at-Tirmidhi 13/2598, Sahih Muslim 1/378, Sahih Muslim 1/379, Sahih Muslim 1/386, and Sahih al-Bukhari 81/148 as examples.
Meaning of eternity as used in the Qur'an
You will find that whenever eternity (as in never getting out) is mentioned, the word khalid (Arabic: خالد) will be followed with the word abad (Arabic: أبد):
إِنَّ اللَّهَ لَعَنَ الْكَافِرِينَ وَأَعَدَّ لَهُمْ سَعِيرًا خَالِدِينَ فِيهَا أَبَدًا لَّا يَجِدُونَ وَلِيًّا وَلَا نَصِيرًا
Indeed, Allah has cursed the disbelievers and prepared for them a Blaze. Abiding therein forever, they will not find a protector or a helper.
— Surat Al-Ahzab 33:64-65
This same use is in numerous verses in the Qur'an (see Qur'an 4:168, Qur'an 4:137, Qur'an 33:65, and Qur'an 72:23, among other verses). You may refer to Will a murderer remain in Hell forever, despite being a Muslim? for an explanation of the different meanings of the word khulūd (Arabic: خلود), commonly translated as eternal, and its use in the Qur'an. You may also refer to the meaning of abiding for eternity in Hell and the people of Hell will abide therein forever for more information.
Hellfire does not perish
There is no known disagreement that Jahannam will exist eternally and that everytime Hellfire subsides, Allah will increase its fire:
مَّأْوَاهُمْ جَهَنَّمُ ۖ كُلَّمَا خَبَتْ زِدْنَاهُمْ سَعِيرًا
Their refuge is Hell; every time it subsides We increase them in blazing fire.
— Surat Al-Isra' 17:97