Regeneration is a destruction-replacement effect. "Regenerate [permanent]" means "The next time
[permanent] would be destroyed this turn, instead remove all damage from it, tap it, and (if it's in
combat) remove it from combat." Because it's a replacement effect, it must be active before the
attempted destruction event. Note that if destruction is caused by lethal damage, any abilities that
trigger from that damage being dealt still trigger even if the permanent regenerates.