In the Poetic Edda poem Völuspá, the Æsir-Vanir War is described as officially starting when Odin throws a spear over the heads of an assembly of Vanir gods.
According to chapter 51 of the Prose Edda book, Gylfaginning, Odin will ride in front of the Einherjar while advancing on to the battle field at Ragnarök wearing a gold helmet, an impressive cloak of mail and carrying Gungnir.
The spear was obtained from the dwarfs by Loki, the result of a scheme he concocted as a partial reparation for his cutting of the goddess Sif's hair.
[1] In Richard Wagner's opera cycle, Der Ring des Nibelungen, Wotan's (Odin's) spear is made from the wood of the world tree, the ash tree Yggdrasil, and engraved with the contracts from which Wotan's power derives.
In the concluding opera Götterdämmerung Wotan is said to have returned to his stronghold Valhalla with the broken spear and withdrawn from worldly matters.