If two poker hands are equivalent, the winner is set by a kicker. A kicker is that the highest value card outside of the pair/three-of-a-kind etc. for instance, a pair of 8s with a K kicker beats a pair of 8s with a ten kicker. If two hands are identical, the pot is split.
To get more confidence on poker hand rankings, try to play free poker games online & then play real cash poker games.