When you have advantage, you roll twice and take the higher roll (and similar for disadvantage you take the lower roll).