It’s hard to know where to begin.
Conventional wisdom is that you begin at the beginning and go on through the middle until you get to the end and stop. But unfortunately, the beginning is usually nebulous at best. Even the straightforward ones that begin “There was once a poor woodcutter…” start somewhere significantly before we pick up the thread. Why did he become a woodcutter? What combination of socioeconomic factors made him poor? And somewhat later in the tale we have to wonder what happened to the local deer population, that wolves have taken to eating grandmothers, and so on. Stories all seem to start significantly before the point that anyone starts to tell them.
Pinning down the endings, therefore, is usually an exercise in frustration.
Part of this story begins several thousand years ago, when Kalaak, the Hyena-Faced God, who laughed a great deal but generally not at things that other people would consider amusing, was bound under the earth with magic chains.
They were quite impressive chains. They were made from swansong and diamond, virgin steel and moonshadows, the bones of the sea and stones from the sky, the breath of fish and the courage of a deer, none of which are terribly easy to get, except maybe the diamonds. The gods had to contract it out to the dwarves, who are good at that sort of thing. The dwarves did most of the work, but even they had to call in outside help, and it was the outside help who lugged the chain up the top of a convenient mountain and tempered it in snow bathed in purple werelight, which is a lot more difficult than it sounds.
The chain worked quite well and the other gods bound Kalaak securely under the earth. Being pragmatic sorts, they also dropped a mountain on him just in case.