Atorvastatin is in a class of medications called HMG-CoA reductase inhibitors (statins). It works by slowing the production of cholesterol in the body to decrease the amount of cholesterol that may build up on the walls of the arteries and block blood flow to the heart, brain, and other parts of the body.