The rats and mice get general anesthesia and surgery. Their coronary arteries are located. Surgical clamps are applied to those arteries. Voila! Those critters just had surgically induced myocardial infarctions, aka heart attacks.
To more closely mimic the natural process, one would induce an artery-blocking clot, not clamp an open artery which, once the clamp is removed, becomes fully open again rather than having to deal with biologically clearing the clot away. Since the point is to track the recovery process, not to kill the mouse.
But it also ought to be possible to breed a variety of mouse that is prone to these clots in the first place.