In poker, hand ranking is decided firstly by traditional poker rankings and secondly on the basis of individual card ranks. There is 13 individual card ranks (Two through to Ace) in a standard 52-card deck. An Ace is the highest ranked card in the deck and if no player has at least a pair in their hand then Ace high wins.
Suppose that you have smallest two pair hand. This will defeat all other hands with one pair or high card. Also, the order of the card ranks matter, so two pair with K-K-8-8 will beat K-K-5-5. The same principle applies with other poker hands like straights and flushes. For example, an Ace high flush will beat any flush that is not Ace high.
Suits of cards (spades, clubs, hearts, diamonds) are not usually considered for determining the rank of hands, but is used to determine the bring-in in stud poker games.
When two players have identical hands like is the case when playing the board, then this is a tie and the pot is divided for both players.