Turner_727 is correct. The ToE wonder completes the tech you're currently researching and lets you choose one more which it also completes. So it is important to just have started on a tech when ToE is finished, so that you get to full techs.
For instance, say that you have 5 turns left for ToE and 6 turns left of Refining. If you do nothing special, when ToE is built, you'll get refinign for free as the first tech, although it was almost reaseached (only one turn left), so you waste much of ToE. Instead, what you should do is to increase research so that refining is finished in 5 turns (the same turn as ToE).
If you are unable to increase the research, you should take a citizen or two away from high-shield squares in the city building ToE, so that ToE is slowed one turn, and thus finishes just after Refining is built.
In both cases, you'll research refining by yourself, and get two additional techs of your choise from ToE.
Another example, say that you finish refining and have three turns left to build ToE. Since you then are unable to research another tech in those three turns, the tech you start on will also be the first given by ToE. Then you should choose your tech as normal, but set research to zero. Since the tech you chooses will be given for free by ToE in three turns, all research you put into it will be wasted.