One day a smith comes to Asgard to propose a plan to build a high wall. He said that if he built it in a certain amount of time then he could take Freya's hand in marriage.
Loki goes to talk to the smith and tells him that he should be able to finish it in one winter.
The builder is able to to finish it by winter so Loki is sent to Meddle with him.
Loki disguises himself as a horse to distract the builder's horse who was helping with the bulk of the work.
The two horses run away.
The giant gets bashed in the head with Thor's hammer.