If you're talking about smoking tobacco I don't know whether or not the actual substance, nicotine, causes a heart attack, but the tars, chemicals and additives to cigarettes certainly do. They cause first the lungs to become congested to the point where they do not function optimally and, eventually, adequately. This results firstly in shortness of breath and eventually not being able to breath without great difficulty. It all takes time, so the onset is gradual and the smoker tends to ignore the warnings.
Then the lack of good, clean, renewable blood to the rest of the body, caused by the gradual blocking of the lungs proper functioning, means the arteries are not scoured and cleaned and the nutriments essential to cellular renewal made. This can result in capillaries becoming blocked. Heavy smokers can, after some years, have to have feet, even lower legs amputated.
And as for heart attacks - yes! Physical exertion where the heart cannot cope with a sudden demand because of narrowing of the blood vessel supply can cause it to fail - that is fail to cope - resulting in a heart attack.
These are just a few of the reasons I gave away smoking at forty-five and am still around, at seventy-nine. So, nicotine in itself, I don't know. But smoking? Well... And we also know it can cause both throat and lung cancer, to name just two, is dangerous to our health.
Word of advice. If you're a smoker, give it up now