Tyr's Hand - Rule Check
Tyr's Hand should be rezzed after the runner encounters a piece of bioroid ice and declares that they are going to break subroutines on that ice (usually via clicks/breakers).  So, in your example, you would rez Heimdall 2.0 first, and if the runner declares that they are going to break the subs, then you would rez Tyr's Hand.  So, you don't have to rez Tyr's Hand when you rez the ICE (which might be useful if they see Heimdall can't break anything anyways).

When the runner declares that they are breaking, you can rez Tyr's hand and trash it to prevent one subroutine from being broken.  This means: whatever the runner spent to break that subroutine is still spent (e.g. 2 clicks from 2.0 ICE, or credits) - however, they can still spend more to rebreak the subroutine.  So, if they used a breaker - perhaps it just costs them an extra credit.  But if they were relying on clicks, then they are out of luck!