So if you cast Shock targeting your opponent, Young Pyromancer will trigger, and that triggered ability will go on the stack before anyone can respond. After the trigger goes on the stack, the opponent can respond by Canceling your Shock, but that doesn’t make the triggered ability disappear. After Shock is countered, the triggered ability will still resolve and make an Elemental token.
Alternatively, the opponent can wait for the trigger to resolve, then still counter the Shock, because the spell goes on the stack before the Pyromancer’s ability can trigger, so the spell that triggered the ability can never resolve before the trigger does.
Today’s Rules Tip written by Josh Stansfield