Metformin is an oral antihyperglycemic medication primarily used to manage type 2 diabetes mellitus. It falls under the biguanide class of drugs and works by decreasing hepatic glucose production, increasing insulin sensitivity, and enhancing peripheral glucose uptake and utilization.