The war between the Aesir and the Vanir survives in two accounts that do not read alike. The Poetic Edda's Voluspa gives it in a handful of gnomic stanzas: a seeress named Gullveig is speared and burned three times in Odin's hall and rises again each time, an event the poem treats as the war's opening cause, then reports only that the Aesir debated whether to pay tribute or to fight, and that Odin cast his spear over the host, the gesture that traditionally opened a battle. The poem never narrates the fighting itself and never names a victor.
Snorri Sturluson's Prose Edda, and his separate history Heimskringla, give a fuller and very different kind of account. In Heimskringla's Ynglinga Saga, Snorri euhemerizes the whole pantheon, presenting Odin as a historical chieftain leading a migrating people out of Asia into Scandinavia, so the Aesir and Vanir war becomes a war between two real, contending peoples rather than a cosmic contest between two divine houses.
Both versions agree on the outcome: a truce sealed by an exchange of hostages, the Vanir Njord, Freyr and Freya coming to live among the Aesir at Asgard while the Aesir Hoenir and Mimir go to live among the Vanir. They agree on one stranger detail too. Both sides spat into a shared vat to seal the peace, and from that spittle the gods made Kvasir, the wisest being ever to live, later killed by dwarves who brewed his blood into the mead of poetry.
Whether either telling preserves a real prehistoric event, one cult absorbing another as two peoples merged, or whether the whole war is a later literary scheme imposed on an originally undivided pantheon, is a live question among specialists rather than a settled one, addressed at length on the Aesir's own page.