Ramipril is a medication used to treat high blood pressure (hypertension) and heart failure. It may also be used to reduce the risk of heart attack, stroke, and death in people with heart problems.