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.
This wording suggests that a successful counterspell interrupts the spell, causing it to fail.
The Mage Slayer feat (PHB, p. 168) states:
When a creature within 5 feet of you casts a spell, you can use your reaction to make a melee weapon attack against that creature.
This text seems to say that you only get the attack if the creature finishes casting the spell.
If a spell is counterspelled, does it still count as a spell cast for the purpose of Mage Slayer's reaction attack?
The answers to this question seem to suggest yes, but unlike many other interrupts, counterspell does actually prevent the spell from being cast, so it's a bit unclear.