Is Hell's Punishment Eternal?
Prophet Muhammad said that no one who ever said there is no God but Allah with sincerity would remain in Hell forever. The Koran consistently talks about believers being the ones who will be rewarded with Heaven. Based on that, a believer who goes to Hell due to a long record of bad deeds will eventually be released and admitted into Heaven.
How long such a person would have to dwell in Hell before he is released depends on his deeds. Allah will judge and sentence him to a definitive period in Hell at a certain level of punishment. When the person has thoroughly paid for his bad deeds, Allah may then release him and grant him Heaven. An interesting Hadith narrates that the last person to leave Hell will literally crawl out of it, with Hell reaching for him persistently to drag him back inside. When he makes it out of Hell's reach, he will exhale and thank Allah for His graciousness.