Three players can have the same pair in texas hold 'em, like if three players have a pocket 8 and the fourth 8 is on the table. In that case (and in several other occurences of ties), the highest other card in play (the "kicker") is used to pick the winner. There's also one bit that's unintuitive, in how the game announces the winner in the case of a side-pot*, because it announces the player who won the most money even if that person didn't have the best overall hand. But everyone still gets the chips they win.
*: If a player goes all in, but doesn't have enough money to cover the current bet, the portion of the pot he can't afford is put in a side-pot that is awarded to the next best hand if the poorer player wins. (You can tell who is eligible to the side-pot by the initials in the side-pot display.) This is to make sure that you can't go all in with like a hundred bucks and still proceed to clean everyone else out in a single hand. If the side-pot is bigger than the main pot, the game only announces the side-pot winner; in that case, the main pot winner still gets the chips he won.