You must be confused somehow. They stand in a room and have mock debates, with someone roleplaying the other candidiate, someone roleplaying the questioneer.. and then they are asked "Now what do you say when asked this kind of question?"
Also.. the questions asked are "pre approved" questions by at least the Bush administration, even if they don't know the exact questions, they know the gist of it.
They are given General Ideas of Debate questions. Kerry and Bush each have their own like "prep team". Basically organizing thoughts, putting them together and presenting them in a common manner (for everyone to understand). And part of why people say Kerry was more prepared, is because he debated a hell of a lot more than Bush does. Hes got a ton of experience with it.