So if something says "melee attack" or "ranged attack", it means your character is the one doing the roll, using your attack bonus(either str or dex depending on your weapon, or casting stat in the case of spells that use an attack roll) plus proficiency and any other bonuses against your opponents AC. If it is equal or greater than your opponents AC, the spell or attack hits.
When just a stat is listed, it means the opponent is the one doing the roll, using their bonus in that stat and any other proficiency or bonuses that might apply, against your spell DC, which is 8 plus your proficiency plus your casting stat modifier. If their roll is equal to or greater than your spell DC, they either aren't affected, or depending on the spell they may take half damage or some other effect which is listed in the spell.
Thanks!