Harper, the 51-year-old host of NBC’s The Biggest Loser, said that he collapsed while exercising at a gym in New York, and that a physician performed CPR and shocked his heart. He was unconscious for two days and hospitalized for eight.

“On the road to recovery. Required to wear these monitors for a while,” Harper tweeted Tuesday, a day after announcing that he had a heart attack two weeks ago.

Heart attacks are caused by a diminished supply of blood to the heart muscle. Most are the result of a gradual buildup of plaque that narrows key arteries, and typically are preceded by warning signs such as chest pain as the muscle receives less and less oxygen-carrying blood.

But perhaps a fifth come with no warning, and often with no known heart disease. Instead of a gradual narrowing, the built-up plaque ruptures.

“The visual there is like the popping of a pimple inside a coronary artery,” said Daniel Edmundowicz, chief of cardiology at Temple University Hospital. “When that gruel interacts with blood, there is a clot formation right away,” he said. Oxygen is cut off, the electrical rhythms that control pumping action go out of control, and the heart stops.

The most common result is sudden death.

Edmundowicz said that he had no specific information about Harper’s case, but that from published reports he appeared to fit this general pattern.

While there are no warning signs for this kind of heart attack, many of the general risk factors apply. Some – smoking, physical activity, obesity – can be modified. Others – age, gender, race, family history – cannot.

As a man, Harper would be at higher risk. He also has said that his mother died of a heart attack.

Although there are rarely warning signs before sudden cardiac arrest, doctors have become better at predicting risk in some cases. Scans can detect calcium that may be present on plaque in coronary arteries. Cardiologists can use those to help determine risk, although it is an incomplete assessment and the scans typically are not covered by insurance.

Meanwhile, the news that a professional trainer had a heart attack while working out should not discourage people from exercising, said Neel Chokshi, medical director of the University of Pennsylvania’s sports cardiology and fitness program.