Odin sent his two ravens, thought and memory, out to explore the universe and the nine worlds to question the living and the dead, and to tell Odin what they learned.
But Odin wanted to achieve the knowledge for himself, and to do so he had to drink from Mimir's well. He traveled to Jotunheim and met with the severed head of Mimir who guarded the well. To get past the giant Odin had to give the giant his eye.
Odin, unsatisfied with only having the knowledge of the worlds, wanted the knowledge of the runes. To get this knowledge he must experience great suffering, so he hung himself from the world tree for nine days with his sword stuck in his side.
The eighteen runes revealed themselves to him and gave his magical powers. He then carved the runes into stones, wood, bone, and animals to share them with man.
Odin, still not satisfied, wanted the mead of poetry so he could become a great poet, but it was stolen by the giant Suttung and hidden away in a mountain. Odin killed suttung's workers in order to trick his brother, Baugi, to get the mead in exchange for work. When the time to get the mead came Suttung refused to give it to Baugi.
Odin asked for Baugi's help to steal the mead. Baugi drilled a hole into the mountain and Odin transformed into a snake to sneak through the. He found Suttung's daughter, Gunlod guarding the mead. He made Gunlod fall in love with him and over the course of three days he slowly stole the mead, returning to asguard when finished.