Foxglove is the source of Digitalin which is used in a number of different preparations to treat cardiac disorders. Digoxin is one of the more commonly used drugs and is used to strengthen the contraction of the heart and to treat arrythmias such as atrial fibrillation.
As Wikipedia says: "A group of medicines extracted from foxglove plants are called Digitalin. The use of D. purpurea extract containing cardiac glycosides for the treatment of heart conditions was first described in the English-speaking medical literature by William Withering, in 1785,  which is considered the beginning of modern therapeutics.   It is used to increase cardiac contractility (it is a positive inotrope) and as an antiarrhythmic agent to control the heart rate, particularly in the irregular (and often fast) atrial fibrillation. Digitalis is hence often prescribed for patients in atrial fibrillation, especially if they have been diagnosed with congestive heart failure. Digoxin was approved for heart failure in 1998 under current regulations by the Food and Drug Administration on the basis of prospective, randomized study and clinical trials. It was also approved for the control of ventricular response rate for patients with atrial fibrillation. American College of Cardiology/American Heart Association guidelines recommend digoxin for symptomatic chronic heart failure for patients with reduced systolic function, preservation of systolic function, and/or rate control for atrial fibrillation with a rapid ventricular response. Heart Failure Society of America guidelines for heart failure provide similar recommendations. Despite its relatively recent approval by the Food and Drug Administration and the guideline recommendations, the therapeutic use of digoxin is declining in patients with heart failurelikely the result of several factors. Digoxin has not been promoted by the pharmaceutical industry and has received little attention at national and international meetingspossibly due to the development and promotion of other, newly patented therapies for heart failure. Safety concerns regarding a proposed link between digoxin therapy and increased mortality in women may also be contributing to the decline in therapeutic use of digoxin. "
In earlier uses of the drug...long replaced by safer therapies...Foxglove was used to treat chest congestion (probably due to heart failure)
Digitalin can be absorbed through the skin from all parts of the plant so gloves should always be used when handling Foxglove.