The magician openly writes the spectator's name on the face of the card. It is written correctly and displayed openly. The spectator signs the card on the back.
There's some secret business you have to do that is built into the routine. Moves, preparation, etc. that allow you to pull off the trick.