Any time the Pokémon with Overkill takes out an enemy Pokémon with a directly damaging attack (not poison, stealth rocks, etc.), the 'extra damage' is absorbed by the attacker.
For example. if Electivire has Overkill and uses Thunderpunch on Gyrados. If Gyrados has 200 HP, and Electivire's Thunderpunch does 250 damage, Electivire will recover the extra 50 HP. Moves like Guillotine, Destiny Bond and Explosion do not trigger Overkill.