Ramipril is a medicine widely used to treat high blood pressure (hypertension) and heart failure. It's also prescribed after a heart attack.