Literally, for the heart to stop beating — a medical condition indicating cardiac arrest.
事故で心臓が止まり、すぐに救急処置が行われた。
The heart stopped in the accident, and emergency treatment was administered immediately.
重い持病が悪化して心臓が止まる危険があると言われた。
I was told my serious illness could worsen and there's a risk of cardiac arrest.
Figuratively, to be stunned or shocked as if one's heart stopped — used to express extreme surprise or fear.
彼女が突然現れて、私は心臓が止まるかと思った。
She appeared suddenly, and I thought my heart would stop.
あのホラー映画は怖すぎて、何度も心臓が止まる思いをした。
That horror movie was so scary that I was startled many times.
試験の結果を見たとき、心臓が止まるほど驚いた。
When I saw the exam results, I was shocked as if my heart stopped.