The player with the highest kicker. For instance if the board is 8-8-8-8-5, you have A-K and your opponent has K-Q, you win. (Your best five-card hand is 8-8-8-8-A, his is 8-8-8-8-K). If the board was 8-8-8-8-A you’d split the pot as the best five-card hand for both of you is 8-8-8-8-A.