heart attacks and strokes are serious conditions, but don't necessarily lead to death...that would be determined by the severity and how quickly that person got medical attention. Sometimes there can be lasting effects - especially with strokes (loss of muscle control or sensation on one side of the body being a big one).
for causes: heart attacks are caused by a blockage in the coronary arteries (the arteries that supply the muscle tissue of the heart with blood and
oxygen) when these arteries are clogged, the muscle becomes oxygen starved and begins to die. Again, not always fatal - but when tissue dies, it does not come back, so the heart can be permanently damaged.
a stroke is also generally caused by blockages - of the arteries to the brain, which causes parts of the brain to become oxygen starved and die as well. however, there are different types of strokes - (hemorrhagic being one - where a blood vessel leaks or bursts)..and treatment depends on the type and cause of the stroke.
artery blockages can be caused by a build up of
plaque (fat deposits) in the artery, or by
blood clots that move through your circulation and then get lodged in the small arteries...in this case - of the brain or heart.
as for avoiding either one - if the cause is blocked arteries due to
cholesterol buildup, a healthy diet low in cholesterol and saturated fats is a good place to start.. if it's a matter of a blood clot - that can be totally random, or occasionally caused after a person has surgery.