The story begins with a builder coming to Asgard and offering to build a stronghold around their golden realm that was so safe and so strong that it would be secure against the might of Cliff Giants, and Frost Ogres. ( Of course it was not strong enough to keep out the Vanir in the Aesir - Vanir War, but that is another story for another time). As wages the builder asked as his reward the Sun , the Moon, and to have Freyja as his wife. The Aesir agreed, ( though somehow I do not think Freyja was told of the bargain), as long as the stronghold was finished in just one winter. If on the first day of summer any part of the wall was unfinished the Aesir would not pay the builder's wages. The builder did ask for the use of his horse Svadilfari, which Loki convinced the Gods would be alright, and not give the builder too much of an advantage.
It was not a good choice for the Aesir to have made, however, as the horse was able to move great boulders into place at incredible speed and with great accuracy. As time went by it began to look more and more as though the builder would be done on time, and that the Aesir would have to pay the builder his unusual wages, which made Freyja furious, and scared Loki to death. The Aesir came before Loki and reminded him that it was he who had convinced them that the use of Svadilfari was not going to give the builder an unfair advantage. Loki decided he needed to come up with a plan to delay the builder just long enough so that he would be late in finishing the project.
When it was three days to summer Loki in desperation came up with a very unique plan to distract the builder's horse. Loki turned himself into a mare, ( the Gods seem to have the ability to shape - change. Examples : Thor turns himself into a young boy to go fishing for the Midgard serpent, and Odin changes himself into a snake to go through the hole that he bore through the side of the mountain when seeking the mead of wisdom ), and galloped over to the stallion Svadilfari. There Loki whinnied, which excited the stallion, who became frantic and broke its traces. The stallion then ran after the mare, ( Loki ), who headed into the woods. The builder tried to catch his work horse but the mare kept the stallion out of his reach. In this way the builder had to try and finish the work himself.
To make a long story short, the builder did not finish the stronghold in time, and when Thor came back from the east, where he was fighting Trolls, he paid the builder his wages, " and they were not the sun, the moon and Freyja ! " Loki in the guise of the mare, however, to keep the stallion Svadilfari interested, had such dealings with the builder's horse that a short while later Loki gave birth to the eight - legged foal Sleipnir. This wonderful and fastest of all horses was given to Odin as a gift, and was later used by Hermod to travel to Niflheim when he tried to bargain for the release of Balder. We are told in the Eddas that it is the best of all horses.
The spawn of Loki encompasses creatures so evil that their very names makes you wince. On the other hand he spawned creatures that were benign such as Hel, and extremely beneficial creatures like Sleipnir, the great horse that can fly like the wind. Whether Loki spawned these creatures, Fenrir, and Jormungand, because he knew of Ragnarok and wanted to strengthen the forces of Chaos is not told to us in the Eddas. Though for me it is hard to believe that he did not know of the coming doom when you consider that Odin, Frigga, and Heimdall, all are able to see into the future. I believe just as their is matter and anti - matter in our universe, which exist in a precarious imbalance, ( just a little more matter than anti - matter, or we would not exist at all ), that their will always be chaos and good. With just a little more good to keep that imbalance in our favor. You see this repeated throughout the 6,000 year history of modern man, so why would it be any different for the Gods who we are fashioned after. Loki is revered by some in the old religion, hated by many, and ignored by still others, ( like me ), but I think that everyone would have to admit that without Loki the tales of the Gods would be pretty dull indeed !
Go with Odin's wisdom, Freyja's love, and Thor's protection !