Like the kung fu to the nose?
#2 pencil in the ear?
Finger in the eyeball?
No, none of the above. A quick chop on the wrist will usually do the trick (rarely is this required though). Gaining control of the throttle from underneath the hand of the student etc. Techniques might vary depending on aircraft type.
Having a plan of what to do with a 'student frozen on the controls' is something every instructor will need at some point. Relying on luck or waiting until it happens before thinking of something is usually not as effective...