Avantrio interview question

How does an OTP function work?