Ranked games are matched in a way that you face available players of similar rank as yours. If there are none with similar rank available at the moment, the rank bracket widens until an opponent is found.
In unranked duels, players are matched in a similar fashion, only instead of rank, their relative power is taken into account.