When you do all the adding and subtracting (not counting the number you thought of), it equals the number they give at the end.
Example, all at once:
Think of a number
add 5
subtract 10
add 15
Subtract your original number
Your answer is 10, isn't it?
They just use a RNG to make it look more random and more psychic(ish).