You make the best five-card hand you can, using any mix of your two cards and the five in the middle.
The higher cards win. Two pairs of kings? The next highest card decides. Two flushes? The one with the highest card in it. An ace is the highest card in the deck.
The five cards in the middle belong to everybody. If there is a pair of queens showing in the middle, then everyone at the table has a pair of queens — it does not make your hand special. What makes your hand yours is what your own two cards add.