In cruise flight, should a helicopter experience an uncommanded yaw the cause in most cases would be an engine failure or tail rotor failure. The direction of the yaw indicates the type of failure.
In clockwise turning rotor system (like the Eurocopter AS350) the engine torque causes the fuselage wants to spin the opposite way (Newton’s third law – for every action, there is an equal and opposite reaction). In this case, from the pilot’s prospective, the nose of the helicopter wants to go to the left. The tail rotor applies a thrust that counters this reaction and pushes the nose back to the right. The pilot varies the amount of thrust with the pedals to control yaw. In powered flight, everything is in balance.
Should the engine fail, the engine torque that the tail rotor is opposing goes away. However, the tail rotor is still producing thrust that is trying to turn the nose right. In this case, the pilot will experience a right yaw and will use left pedal to neutralize it. With a tail rotor failure (loss of drive, producing a complete loss of thrust) the force opposing the engine torque ceases allowing the fuselage to spin the opposite of the rotor system. As such, the pilot will experience a yaw to the left. However, since the tail rotor is no longer effective applying opposite pedal does not work. Airflow over the vertical fin will prevent the helicopter from completely spinning and allow the pilot to fly the helicopter to a suitable area and perform an autorotation. Shutting the engine off eliminates the torque allowing the nose to come back to the right.
In a hover, it is a little different due to the reduced air flow over the vertical fin. Instead of just yawing, the fuselage will start spinning. In the case of an engine failure, opposite pedal will work. With a tail rotor failure, the pilot must immediately enter autorotation.
In a counter-clockwise turning rotor system (like the Bell 206) the theory is the same, but the nose moves in the opposite direction for each failure.