The heart will not simply stop beating -- however, it may fail to contract effectively/synchronously, which is almost the same thing. This is generally called congestive heart failure
, but for only temporary periods, what you might be referring to is ventricular fibrillation
, which is a dangerous condition because it may precipitate heart failure very rapidly -- which is why I imagine your friend/family-member was hospitalized. Ventricular fibrillation may be caused by many things, but is most commonly due to a rapidly-pacing node that may be the AV-node or some other ectopic focus in the ventricles somewhere.
Otherwise, what you might be thinking of is sinus/AV blockade, where the impulses from the SA node fail to reach the ventricles, due to a barrier in the AV-node. This may also result in ventricular tachycardia/fibrillation, because of the lack of a normal rhythm.