There is a mnemonic i use for the treatment of heart attacks.
MONA
Morphine
Oxygen 100%
Nitroglycerine
Aspirin
This is the immediate treatment of a heart attack.
There are many variations in heart attack, thus other drugs a also used.
After the first heart attack a patient mostly stays on certain drugs for a long time.
Technically, a defibrillator is used to stop a heart from an ongoing fibrillation i.e a heart beating at a very high rate.
More importantly, as we see in the movies 'zapping the heart' is also used to start a heart that has stopped, may it be any reason.
A heart attack can stop the heart, if it is severe enough. Then defibrillators are used as the final resuscitation procedure.