Hello World! interview question

Q: Explain and code a way to detect a win in tic tac toe.