The climax of the movie sees Loki take Surtur's mask to the Eternal Flame to awake the demon and bring about Ragnarok, much to Hela's dismay as she watches her power source be destroyed.
In the comics, Surtur seeks vengeance on Odin, which is ported over into Ragnarok on screen, in which Surtur vows to bring about the end of Asgard. But the demon hasn't really thought his plan through. At the end, when he drives his mighty dread sword Twilight into the core of the planet to destroy it, he might fulfil his prophecy and presumably kill Hela in the process too, but what then happens to him?
He's essentially just destroyed the thing he was standing on to make a point to Odin, who is already dead, and either sacrificed himself (a hollow victory if ever there was one) or he's now destined to float through space hopelessly for a while.