In Texas Holdem, two players end up with a pair and a high card. One has two Queens and a King high card, while the other has two Aces and a Queen high card. Who wins the hand?
(1) Poker hands have exactly five cards, so you haven't actually described their hands correctly. The first player has something like QQK75, and the second player has something like AAQ92.
(2) If both 5-card hands contain one pair and no other valuable combination, the higher pair wins, in this case, the aces. Only if both hands have the same pair do you then compare the side cards, in order. For example, AAQ52 defeats AA976, because the Q beats the 9; AAQ73 beats AAQ54, because the 7 beats the 5; finally, AAQ75 beats AAQ74.
In Texas Hold'em, the hand order goes (Lowest to Highest): No Pair (high card) -> 1 Pair -> 2 Pair -> 3 of a Kind -> Straight -> Flush -> Full House -> 4 of a Kind -> Straight Flush -> Royal Flush.
Now if any hand is in a category that is higher than another, that hand wins, no matter what the value of the cards are (example: 22245 beats AAKKQ). In the event that two players are within the same category (your example: QQK95 vs AAQ95) then the hand goes to the highest value within that category. In this case the category (or hand rank) is 1 Pair, and the Aces have the Queens beat, therefore the pair with the aces wins. Say that both hands had matching pairs though (example: AAQ94 vs AAK53), since both hands have equal valued pairs (AA vs AA) the hand will be determined based off of the next highest card, and in this case the K beats the Q, so the AAK53 hand wins.
This can be applied with any hand.
Recap for order in determining which hand wins:
- Highest hand rank/category (ex. 1 pair, 2 pair, flush, etc.)
- Highest value within same category (ex. aces vs kings)
- Highest "next in line" card if value within category is equal (ex. AAK vs AAQ). This can continue until there is a difference (ex. AAK73 vs AAK75)