Like in this trick, Derren appears to know Fry's card is the king of diamonds, but he doesn't. It's just quite probable[0], and if he was wrong you wouldn't even notice he was guessing, the way it's worked into the trick. If he's right, it also doesn't seem like a guess, but like he somehow knew for certain. The initial deck has only 6 different cards, and Derren has 6 different card-cigarettes hidden on his person. By then he's been told what the card is, so he can't fail that part.
[0] I think Derren half-forces a red diamond picture card, by the way he asks Fry to BURN the card into his mind, but not 3 of hearts, i.e. not a number or heart. He probably can force the choice of a King of Diamonds a lot of the time. A lot of his skill lies in increasing probabilities any way he knows how, until the apparently impossible occurs.
The audience doesn’t know the plot of the trick, so the actual reveal can be different depending on how things go.