Stroke is often due to sudden loss of blood supply to a region of the brain which usually results in paralysis of a part of the body. Stroke could also be due to bleeding into a part of the brain. Strokes and heart disease are linked together in various ways. In general, risk factors for stroke and some forms of heart disease are similar. Strokes due to blocks in blood vessels, can be seen along with blocks in blood vessels of the heart. Stroke can occur after a heart attack as well. Heart attack damages a part of the heart muscle. This can lead to damage of the inner lining of the heart in that region. A blood clot can form on the inner surface of the heart as a consequence. These clots can break away into the circulation and get lodged into a blood vessel of the brain. The clot thus blocks a blood vessel of the brain and causes stroke.
Another type of heart disease which leads to stroke is an abnormal rhythm of the heart known as atrial fibrillation. In atrial fibrillation, there is a fast irregular rhythm originating in the upper chambers of the heart. The rhythm is so fast that effective contractions of the upper chambers cease. This leads to stagnation of blood in certain parts of the left atrium (upper chamber of the heart), where a blood clot can form. These clots can also get dislodged and travel to blood vessels of the brain. They in turn block a blood vessel of the brain and cause stroke.
Another reason for stroke is high blood pressure. When the blood pressure goes very high suddenly, small blood vessels in the brain may break leading to a bleed into the brain matter. This form of stroke (hemorrhagic stroke) is generally more dangerous than a stroke due to blockage of a blood vessel. Even without a bleed, brain function can be altered due to high blood pressure, causing alteration in the level of consciousness. But then that is not a stroke, but called as hypertensive encephalopathy (brain disease due to high blood pressure).