As @Maximuuus says, you roll two d20s and take the higher (advantage) or lower (disadvantage).
If you need X to hit, then Advantage is roughly equivalent to a Y Bonus to a single d20 roll (not accounting for crits dealing double damage)
X Y
2 +0.95
3 +1.8
4 +2.5
5 +3.2
6 +3.75
7 +4.2
8 +4.55
9 +4.8
10 +4.95
11 +5
And symmetric for values 12-20. This averages out to a +3.5 bonus.
However, it's almost always true for D&D 5e that you need to roll somewhere between a 6 and a 13 to succeed. Thus, the true effect of Advantage is closer to +4.6.