The Norse universe is a corpse that has been butchered, and the butchers are the gods.
Grímnismál stanzas 40 and 41 give the inventory. From Ymir's flesh the earth was made; from his blood, the sea; from his bones, the mountains; from his hair, the trees; from his skull, the sky. And from his eyebrows the kindly powers made Miðgarðr for the sons of men, and from his brains all the hard-tempered clouds.
Snorri repeats it and adds the maggots. Creatures had bred in the dead flesh, and the gods gave them human understanding and the shape of men, and these were the dwarfs — four of whom, Norðri, Suðri, Austri and Vestri, were set at the four corners to hold up the skull.
There is no craftsman here and no word of command. There is a killing, a body, and a construction project.
Two accounts of how he came to exist
The gap between the sources is worth setting out precisely, because it is one of the clearest cases of Snorri systematising material that did not want to be systematised.
Vafþrúðnismál is a wisdom-contest poem, and Odin asks a giant where the earth and sky came from. The answer: from Ymir's flesh was the earth shaped, from his bones the mountains, from the skull of the rime-cold giant the sky, and from his blood the sea. Asked where Ymir himself came from, the giant answers that from the Élivágar — the icy waves — drops of venom sprayed out and grew until a giant came to be, and that a boy and a girl grew beneath his arm while one foot fathered a six-headed son on the other. The name given there is Aurgelmir, and the giant states plainly that this is what his people call the one the Æsir call Ymir.
Gylfaginning takes that and builds a cosmogony with a symmetry the poem does not have. Snorri introduces Niflheimr in the north and Múspellsheimr in the south, with the void Ginnungagap between them, and has the rime from the north meet the sparks from the south so that the ice thaws and drips and quickens into Ymir. He then adds the cow Auðhumla, who nourishes Ymir with four rivers of milk and licks the salty rime-stones for three days until Búri emerges: hair on the first day, head on the second, whole man on the third. Búri fathers Borr; Borr and the giantess Bestla have Óðinn, Vili and Vé.
The cow appears in no other source. Neither does the fire–ice polarity in that developed form. Whether Snorri had access to a tradition now lost, or constructed the scheme out of a handful of hints and his own reading, is a real and unresolved question — and the answer determines how much of the most famous creation myth in northern Europe is medieval literary invention.
The killing and the flood
Óðinn and his brothers kill Ymir, and the blood that comes out of him drowns the entire race of frost-giants except one, Bergelmir, who escapes with his household on a lúðr.
Nobody knows what a lúðr is. The word elsewhere means the wooden frame or hollowed trunk of a hand-mill, and it can also mean a trumpet, and Snorri understood it as a boat or an ark. That reading gives the Norse a flood story with a survivor in a vessel — which is either an authentic parallel to the widespread northern deluge material or a Christian scribe finding Noah in an ambiguous noun. Vafþrúðnismál itself says only that Bergelmir was laid on a lúðr, which some editors take to mean a coffin, making the stanza about a burial rather than an escape. See the flood myths compared for how differently this reads next to Mesopotamian and Greek versions.
What kind of being he is
Ymir is not a god, an enemy, or a person. He does nothing, wants nothing and says nothing. He is asexual and self-generating: children grow from his armpit and his legs, without partner or intent, which makes him a source of life in the same undirected way that a compost heap is.
His name has been connected to a Proto-Indo-European root for "twin," linking him to Sanskrit Yama and possibly to Roman Remus, and to a wider comparative pattern in which a primordial being is dismembered to form the cosmos — the Vedic Puruṣa hymn is the closest parallel, and it is very close indeed. Alternatively Ymir has been derived from a root meaning to cry out or roar. Both remain live.
He is also called Brimir and Blaínn in some verses, and Völuspá is uncertain enough about it that editors disagree over whether those are names for him or for someone else.
The idea underneath
Norse creation is the only major European cosmogony in which the world is not made for anyone. There is no plan, no benevolence and no purpose — a body existed, it was killed by its own descendants, and the pieces were arranged into a habitable structure. The sky over Scandinavia is a skull held up at the corners by four dwarfs who were originally maggots.
That is worth stating plainly, because most retellings soften it into a fire-and-ice creation fable. See the making of the world from Ymir for the full narrative, Ginnungagap for the space it happened in, and creation myths compared for how unusually violent this one is.
Are the giants descended from Ymir, and the gods not?
Both are, and that is the point the genealogy keeps making. The jötnar descend from Ymir directly. So does Odin, through his mother Bestla, daughter of the giant Bölþorn — and through his father Borr, whose own father Búri came out of the ice Ymir's cow was licking. The gods and giants share the same origin and the same body; the war between them is a family dispute over the estate, which is exactly how the family tree draws it.
Why do the dwarfs hold up the sky if they came from maggots?
Snorri gives no reason and the arrangement is probably two traditions stitched together. The four dwarfs named for the cardinal directions look like a cosmological convention — corner-supports appear widely — while the maggot origin is a grimly logical inference from the raw material: a body large enough to make a world would putrefy, and something would breed in it. That Snorri joins the two without comment is characteristic, and it leaves the sky of Norse cosmology resting on four ennobled larvae.