The Time Worm is a gigantic, worm-like creature with a white and blue body. Its head consists of 3 holes, one of which it can expand to devour people and objects. It has no brain.
The Time Worm can freely travel through time and space by using time holes; rips between dimensions that open up when a new reality occurs.
Its task is to keep the timeline clear of any anomalies, to ensure that there is only ever one true timeline. If, through time travel, the past is changed and a new timeline is created, the time worm will appear to devour any leftovers of the old timeline until only the new time line is left. Including people that should no longer exist.
Chances of surviving a Time Worm attack are almost zero.
Role in the series
The Time Worm is first seen in "Chapter 8: The Fifty Year Night" when Hilda uses an enchanted copy of the magazine Trolberg Digest to travel back in time, and change the past so her neighbor Peter Ostenfeld and Matilda Pilqvist end up together (originally, they never saw each other again after their first date). This creates an alternate timeline in which Peter was never her neighbor, and the Hilda that met him and subsequently time travelled should thus not exist.
A future version of Hilda comes to warn her for the time worm, but the warning arrives too late. The worm first attacks and devours the various versions of Peter Ostenfeld that had been using time travel to relive the night with Tildy. When the worm turns its attention to Hilda. Hilda's future version distracts the worm, and is eaten by it, while Hilda herself travels back to her own time. The worm easily follows her there, so Hilda seeks out help from Tildy. Tildy is able to magically freeze the worm for a moment, but even she can't hold it off forever. The only way to escape the worm is to undo the time travel, which is done by destroying the original enchanted magazine. With the timeline restored, the worm has no more reason to devour Hilda and leaves.