A kicker that counts
On K♠ 9♦ 7♣ 4♥ 2♠, A♣ K♦ beats K♥ Q♣: both have kings, but ace-high side cards beat queen-high side cards. For one pair there can be three kickers; compare them in descending order until one differs. Do not compare a player’s unused sixth card.