How the chance works
Each time durability would be consumed, Unbreaking gives a chance the durability is not spent. The probability depends on the level and the item type; for most tools Unbreaking III means roughly a 3× longer life, and in practice the average durability is multiplied by (level + 1) for most items.
Its role with Mending
Mending restores durability from experience; Unbreaking means fewer repairs are needed in the first place. Together they are the standard 'forever tool' combination on pickaxes, swords, armour and the elytra — you repair rarely and never replace.
Where to prioritise it
Put Unbreaking III on anything you use constantly: your main pickaxe, sword, bow, elytra and armour. It is cheap to obtain (a common table offer and a librarian trade) and it multiplies the value of every other enchantment you add.