Tic-tac-toe is a game for two players, X and O, who take turns marking the spaces in a 3�3 grid. The player who succeeds in placing three of their marks next to each other in a straight line (either horizontally, vertically, or diagonally) wins the game.