Typically, the winner of each hand of poker is the player that holds the highest ranked hand when all cards are shown at the end of the hand known as the 'showdown'  or the player that makes the last uncalled bet, thus winning without needing to reach a showdown.
To determine the winner of the poker game, look first at the type of hand each player has and its rank. A flush beats a straight, three of a kind beats a pair, and so on. The player with the highest 5 card score wins.