Aftermath
Damages the attacker for 1/4 its max HP when knocked out by a contact move.
Full effect
When this Pokémon is knocked out by a move that makes contact, the move's user takes 1/4 its maximum HP in damage.
In game description
Damages the attacker if it knocks out the Pokémon with a move that makes direct contact.
Pokemon with Aftermath
Using Aftermath in Cobblemon
Abilities are passive and always active, so Aftermath costs you nothing to run. If it is marked hidden on a species above, expect it to be harder to obtain: servers differ in whether hidden abilities come from breeding, an Ability Patch, or events.
See the Pokedex for which abilities each species can have, and IVs, EVs and breeding for how to actually pass one down.