The magician hands a book to a spectator and asks the spectator to choose any page at random. The spectator chooses a line on the chosen page, and then a word on the line to concentrate on.
The magician make a mental connection with the spectator and reveals the randomly chosen, thought-of word.
The book is fake, as you might have guessed. Such books exist in two forms: those in which every page is identical (requiring the magician to memorize every word on the page and its position), and those in which every word on every page is identical (requiring the magician to remember only one word).
Note: The original incarnation of this effect was called the Hoy Book Test. In this version, the book was supposedly written in Chinese, but in fact contained nothing but the word "hoy". For example, a line of text might read, "Hoy hoy hoy. Hoy? Hoy! Hoy hoy hoy, hoy hoy hoy hoy."
Saying that the book was in a foreign language made it easier for a spectator casually glancing at a page to overlook the fact that every word of text was the same.