In Norse mythology, Ymir (Ymer) was a primordial giant who formed the basis of the creation myth:
At first, there was nothing at all. There was only the huge, dark abyss called Ginungagap, which was bordered to the north by Niflheim (a region of ice) and to the south by Muspelheim* (a region of fire). Over time, the heat from Muspelheim caused frost to melt in Niflheim. A spring of water, Hvergelmir, began to flow and then branched into twelve strong springs called Elivagar. The springs flowed into Ginungagap, where the cold from Niflheim turned it back into ice. As the ice built up, it grew closer and closer to the region of fire. The sparks from Muspelheim mingling with the melted waters of Elivagar created the first life in the form of the giant Ymir.
On the same day, a boy and girl appeared under the left hand of Ymir and, from his legs, Trudgelmir was born. These became the race of giants known as Hrimturses, who were cruel as the fire and ice. In Ymir’s left armpit, the melting frost became the holy cow Audumla. The cow’s four udders produced four rivers of milk which fed Ymir and his offspring. There was no grass for Audumla to eat, so she fed on the salty ice. At the end of the first day, her licking exposed hairs. On the second day, a man’s head appeared and on the third day, Buri, a powerful giant, sprang from the ice.
Buri’s son, Bor, married the giantess Besla who gave birth to the gods Odin, Vili and Ve. The three gods disliked living under the cruel dominion of Ymir, and so rose against him and, after a long war, killed him. The blood of Ymir was so copious that it drowned Audumla and all of the giants except for Bergelmir. At that point, the gods were free to create the world as they saw fit.
They created the earth in the void from Ymir’s body, shaping it into a disk and placing it in the ocean which formed from the giant’s blood. Ymir’s domed skull was made into the sky, his bones made into mountains, his hair became trees, his teeth were fashioned into the stones and his brain was turned into the clouds. Mitgard, the realm of men, was shaped from the giant’s eyebrow. Under the four corners of the sky, the gods placed a dwarf (formed from the maggots that consumed the flesh of Ymir), and they were called Austri (East), Vestri (West), Nordri (North), and Sudri (South). In the sky, Odin and his brothers put sparks from Muspelheim, and these were the stars. Some of the stars were stationary, but others moved, so that people could know the time. The sun and the moon were sparks collected from the sword of Surtr, the flame-giant which kept watch over Muspelheim.**
After the world was shaped and finished, humans were created when Odin, Vili and Ve were walking along the shore and found a piece of ash-wood and a piece of elm-wood. The gods breathed life into the wood, turning the elm into the first woman, Embla, and the ash into the first man, Ask. Odin and his brothers did not forget about Bergelmir’s escape. To the east of Mitgard, they created Yotunheim for Bergelmir and his descendents. Finally, they built Asgard for themselves and the other gods.
* Also Muspell, Muspellgheim
** A somewhat different account of the creation of all things can be found here. Much thanks to Shro0m for pointing this out.