The rule
When something gives you advantage, roll two d20s and use the higher. With disadvantage, use the lower. If you have both, they cancel and you roll one die, no matter how many sources of each you have. Several sources of advantage still only give you two dice.
What it is worth
Advantage matters most when you need a middling roll. Needing an 11 or higher:
| You need | One d20 | Advantage | Disadvantage |
|---|---|---|---|
| 6 or higher | 75% | 93.75% | 56.25% |
| 11 or higher | 50% | 75% | 25% |
| 16 or higher | 25% | 43.75% | 6.25% |
At the middle of the die, advantage is worth about the same as a +5 bonus. At the edges it is worth less, which is why it pays to hunt for it on the rolls you are most likely to fail.
Critical hits
With advantage the chance of a natural 20 nearly doubles, to 9.75%. With disadvantage the chance of a natural 1 does the same. The full story, with the maths drawn out, is in Advantage and Disadvantage in D&D.