When a player goes all-in, he wagers all their remaining chips. If other players continue betting, the pot is then split into a main pot and any side pots. The all-in player can only win the main pot, while other players compete for the side pots. This ensures fair competition even when players have different stack sizes.