Vaarsuvius gained ultimate arcane power through the Soul Splice. This is detailed in the Order of the Stick book Don't Split the Party in Rich Burlew’s commentary on the page facing strip 623 (titled “Running Away”), and continued after the page containing strip 642 (titled “Choice”).
A fair use excerpt from the book here (emphasis added):
One of the trickier things about using a prophecy as a plot point is that it tells the audience exactly what is going to happen in advance, potentially removing any suspense along the way. The way writers remedy that is usually through prophecies that can be read with multiple meanings, with the least expected meaning being the correct one. So it is with V’s prophecy from the Oracle, as depicted in War and XPs. V asks the kobold “How will I achieve complete and total ultimate arcane power?” The Oracle responds, “By saying the right four words to the right being at the right time for all the wrong reasons.” In this chapter, that prophecy is fulfilled—but not the ways the readers expected.
And just to make it super explicit, Burlew goes on:
…I invented the idea of the Soul Splice to give Vaarsuvius everything he/she ever wished for… V accepted the splices, he/she did have complete and total ultimate arcane power—insofar as he/she contained all three possible Soul Splices (and thus a complete set), and could use all their spells at the same time (accessing the sum total of their magic), and had more total spell levels available than any other spell caster (giving him/her the ultimate selection of arcane powers).
The four words, uttered in strip 634 (titled “The Wrong Reasons”), were “I… I must succeed,” (the Oracle did not say “four different words”, just “the right four words”) and these four words were uttered, per more Burlew commentary, to the actual "being in question? Vaarsuvius him/herself."