In poker, when two players both have two pair, the winner is determined by comparing the highest pair of each player. If both highest pairs are the same, then the second pairs are compared. If both pairs are identical, the fifth card, known as the 'kicker,' decides the winner.