Avantrio Interview Question

How does an OTP function work?