And just to add, if the highest cards are tied, then it goes to the next card until someone has a lower next card.
e.g. 8432A 76543
76543 wins because the 7 is lower than 8
86432 8642A
8642A wins because the 2 is lower than the 3. Notice the first three cards are the same, so we had to go to the fourth card to find the winner.
Finally, hands are always compared starting with the highest card you are playing for your five cards. So having 432A does no good if your fifth card is Q. A lone opponent with J high would still beat you.