Sunni fairly universally believe that hell is finite for a Muslim person and that there will be eventual salvation of anyone who died honestly professing the faith, except for one possible case where it’s ambiguous (major apostasy). Some verses in the Koran and the Sunni hadith suggest that Hell itself will be destroyed one day, and so all the souls therein will either find salvation or cease to exist, so most Sunni are hopeful of eventual universal salvation.
For almost all Shia, Hell is infinite and inescapable. They treat Hell as being almost a being unto itself that hunts and preys upon people.
The Sufi have a really complex view of the afterlife and I’m not sure I really understand it all completely, but here is what I’ve gathered from the Sufis I know. They don’t see Heaven and Hell as being necessarily separate places, but a spectrum of distance or proximity to God. Even so, the distance is considered to be illusion, so in a weird sort of way, people put themselves in Hell because they do not choose to draw near to God and they can change that at anytime they choose.