You attempt to interrupt a creature in the process of casting a spell. The creature makes a Constitution saving throw. On a failed save, the spell dissipates with no effect, and the action, Bonus Action, or Reaction used to cast it is wasted. If that spell was cast with a spell slot, the slot isn't expended.
Counterspell
3rd-level abjuration · D&D 5e (SRD)
2024 rules (SRD 5.2.1)
Casting Time: 1 reaction, which you take when you see a creature within 60 feet of yourself casting a spell with Verbal, Somatic, or Material components
Range: 60 feet
Components: S
Duration: Instantaneous
2014 rules (SRD 5.1)
Casting Time: 1 reaction, which you take when you see a creature within 60 feet of you casting a spell
Range: 60 feet
Components: S
Duration: Instantaneous
You attempt to interrupt a creature in the process of casting a spell. If the creature is casting a spell of 3rd level or lower, its spell fails and has no effect. If it is casting a spell of 4th level or higher, make an ability check using your spellcasting ability. The DC equals 10 + the spell's level. On a success, the creature's spell fails and has no effect.
At Higher Levels
When you cast this spell using a spell slot of 4th level or higher, the interrupted spell has no effect if its level is less than or equal to the level of the spell slot you used.