Once the last round of betting is complete, those still left in the hand will turn over their cards (called the showdown), and the player with the best poker hand, using any (1058, five-card combination} from the seven available (five in the middle and two in their hand), will be declared the winner and collects the chips that were placed in the pot.
Each player can use one, both, or neither of their hole cards to make a five-card poker hand during the showdown phase.
In some rare cases, the best hand will be the five community cards on the table, and all players with a live hand will split the pot accordingly.
If two or more players have the same hand during a showndown, those players split the pot evenly; suit ranking or a sixth card are hardly ever used to break a tie (and never online). If there is an odd chip of the smallest denomination after the pot is split, the remainder chip will be awarded to the player closest to the left of the dealer button.
Once the pot is awarded, the dealer button moves one position to the left and a new hand of poker starts when the next two players post their blinds.
The new dealer will shuffle and deal the cards (if you are playing in a homegame). In a casino or online, the players don’t have to deal and the position of the dealer is represented by a dealer button in front of the player. In a poker tournament, play continues until there is one player left with all the chips. In a cash game, players are allowed to come and go as they please, but can’t buy in for more than the table limit (which can vary).
Here is an Texas holdem rules overview for a quick reminder of the all the betting rounds and their rules.