Note: This story is also known as Sif’s Golden Hair, as well as The Creation of Thor’s Hammer.
Source: Norse Mythology for Smart People
One day, Loki the trickster found himself in an especially mischievous mood and cut off the gorgeous golden hair of Sif, the wife of Thor. When Thor learned of this, his quick temper was enraged, and he seized Loki and threatened to break every bone in his body. Loki pleaded with the thunder god to let him go down to Svartalfheim, the cavernous home of the dwarves, and see if those master craftspeople could fashion a new head of hair for Sif, this one even more beautiful than the original. Thor allowed this, and off Loki went to Svartalfheim.
There he was able to obtain what he desired. The sons of the dwarf Ivaldi forged not only a new head of hair for Sif, but also two other marvels: Skidbladnir, the best of all ships, which always has a favorable wind and can be folded up and put into one’s pocket, and Gungnir, the deadliest of all spears.
Having accomplished his task, Loki was overcome by an urge to remain in the caves of the dwarves and revel in more recklessness. He approached the brothers Brokkr and Sindri and taunted them, saying that he was sure the brothers could never forge three new creations equal to those the sons of Ivaldi had fashioned. In fact, he even bet his head on their lack of ability. Brokkr and Sindri, however, accepted the wager.
As they worked, a fly (who, of course, was none other than Loki in disguise) stung Sindri’s hand. When the dwarf pulled his creation out of the fire, it was a living boar with golden hair. This was Gullinbursti, who gave off light in the dark and could run better than any horse, even through water or air.
Sindri then set another piece of gold on the fire as Brokkr worked the bellows. The fly bit Brokkr on the neck, and Sindri drew out a magnificent ring, Draupnir . From this ring, every ninth night, fall eight new golden rings of equal weight.
Sindri then put iron on the hearth, and told Brokkr that, for this next working, they must be especially meticulous, for a mistake would be more costly than with the previous two projects. Loki immediately stung Brokkr’s eyelid, and the blood blocked the dwarf’s eye, preventing him from properly seeing his work. Sindri produced a hammer of unsurpassed quality, which never missed its mark and would boomerang back to its owner after being thrown, but it had one flaw: the handle was short. Sindri lamented that this had almost ruined the piece, which was called Mjollnir . Nevertheless, sure of the great worth of their three treasures, Sindri and Brokkr made their way to Asgard to claim the wages that were due to them.
Loki made it to the halls of the gods before the dwarves and presented the marvels he had acquired. To Thor he gave Sif’s new hair and the hammer Mjollnir. To Odin went the ring Draupnir and the spear Gungnir. And Freyr was the happy recipient of Skidbladnir and Gullinbursti.
As grateful as the gods were to receive these gifts – especially Mjollnir, which they foresaw would be of inestimable help in their battles against the giants – they nevertheless concluded that Loki still owed the dwarves his head. When the dwarves approached Loki with knives, the cunning god pointed out that he had promised them his head, but not his neck. Brokkr and Sindri contented themselves with sewing Loki’s mouth shut, and returned to their forge.