The hexagrams of the I Ching are numbered 1 through 64 and arranged in a particular order known as the King Wen Sequence. This sequence and the rules which determine its order is humanity's most ancient abstract formulation, its genesis dating from somewhere in prehistory. In fact, the precise rules governing the order of this sequence is still a mystery. Terence McKenna was the first modern to claim knowledge of this secret. In fact, by analysis and mathematical manipulation he derived a date for the end of the world: December 21, 2012. Strangely enough, this corresponds very closely with the end-date of the Mayan calendar. McKenna had no previous knowledge of the Mayan calendar when he derived his date. Interesting, eh? The details are given on his website and in his book, The Invisible Landscape

The I Ching supposedly represents the 64 archetypes around which all events in time are created. Thus by consulting it, it will reflect the conditions of the moment in which it is being consulted. In a nutshell: since the universe is a series of random probabilities, performing a random action (like flipping a coin) will result in a pattern (hexagram) that reflects reality enough to provide insight.