Atorvastatin is used along with diet, exercise, and weight-loss to reduce the risk of heart attack and stroke and to decrease the chance that heart surgery will be needed in people who have heart disease or who are at risk of developing heart disease. Atorvastatin is also used to decrease the amount of cholesterol (a fat-like substance) and other fatty substances in the blood. This will decrease the risk of stroke, heart attack, and other heart diseases because when there are high levels of cholesterol and other fats in the blood, these substances may build up along the walls of the blood vessels and decrease or block blood flow to the heart. Atorvastatin is in a class of medications called HMG-CoA reductase inhibitors (statins). It works by slowing the production of cholesterol in the body.