I can't remember exactly, but there are a couple of options:
Take the odometer apart very carefully, and simply put the numbers back to what the should be... then carefully reassemble.
Attach a drill to the little motor that turns them round, and whiz them until they read the right number again.
I don't know if they go backwards, or if you have to put them through another 9999 miles forwards.