used to treat high blood pressure (hypertension) and heart failure. It's also prescribed after a heart attack. Ramipril helps prevent future strokes, heart attacks and kidney problems. It also improves your survival if you're taking it for heart failure or after a heart attack.