How long does it take high blood pressure to cause heart attack? Hours, years, what?

Years. High blood pressure is associated with the development of atherosclerosis or plaques in the arteries. This accumulation of fat in the arterial wall takes years to develop.
Years. The problem is, most people don't know when their hbp began and have already been exposed for years when diagnosed. Also, hbp is only 1 of many risk factors. It is actually a more potent risk factor by far for stroke and congestive heart failure than for heart attack. (also kidney failure). Treating it lowers the risk.