You can find the definition of an attack in the Player's Handbook (p. 194) or here in the basic rules. Specifically, it states:
If there's ever any question whether something you're doing counts as an attack, the rule is simple: if you're making an attack roll, you're making an attack
What the means is that an attack with a physical weapon counts, an attack with a spell counts, but a spell with no attack roll (like Burning Hands, or other spells with a save) do not count.
So as long as you're rolling a d20 (and adding modifiers) to beat the target's armour class (as opposed to making the target rolling d20 to beat the caster's DC), and you beat the AC, you can use Hurl Through Hell.
Something is also an attack if it is called an attack in the rules, regardless of if it makes an attack roll
Note that there are a very few things that are considered attacks that do not involve an attack roll. Specifically, grapple and shove are called out as "special melee attacks" in the rules and thus count as attacks despite the fact that they do not involve an attack roll.
This has been confirmed by Jeremy Crawford many times, but specifically in a helpful reiteration of the PHB rule:
An attack involves an attack roll or doing something that the rules call an attack, like grappling or shoving