Statins function by blocking the action of the enzyme HMG-CoA reductase in the liver. This enzyme is responsible for the conversion of HMG-CoA to mevalonate, an essential step in cholesterol biosynthesis. By inhibiting this process, statins effectively reduce the liver's production of cholesterol, leading to lower levels of low-density lipoprotein (LDL) cholesterol in the bloodstream.