Glimepiride is a sulfonylurea which works by increasing the amount of insulin released by the pancreas in order to lower the blood glucose.
Metformin is a biguanide. It works by lowering glucose production in the liver, delaying glucose absorption from intestines and increasing the body's sensitivity to insulin. Pioglitazone is a thiazolidinedione which further increases insulin sensitivity.