Weight loss, whether achieved by lifestyle intervention, pharmacotherapy, or bariatric surgery, is highly effective as a primary interventional strategy in both the prevention and treatment of type 2 diabetes. In high-risk patients with prediabetes and/or metabolic syndrome, weight loss effectively prevents progression to type 2 diabetes mellitus (T2DM) and improves cardiovascular risk factors. These benefits are the result of improvements in insulin resistance, which is central to the pathophysiology of cardiometabolic disease. In patients with T2DM, weight loss improves glycemia, while reducing the need for conventional glucose-lowering medicines, by affecting all three processes that produce and sustain the hyperglycemic state, namely via increments in peripheral insulin sensitivity with improvements in insulin signal transduction at the cellular level, more robust insulin secretory responses, and reduced rates of hepatic glucose production. In both nondiabetic and diabetic subjects, hypocaloric feeding (e.g., treatment with very low-calorie diet or bariatric surgery) produces a rapid improvement in insulin sensitivity due to mobilization of fat from the intramyocellular, intrahepatocellular, and intra-abdominal compartments, and via a more long-term mechanism that correlates with the loss of total body fat. In diabetes, by improving glycemia, weight loss also enhances glucose homeostasis by reversing the defects in insulin action and secretion attributable to glucose toxicity. Regardless of the therapeutic approach, weight loss of ∼10 % maximally prevents future diabetes in patients with prediabetes or metabolic syndrome. In T2DM, greater degrees of weight loss lead to progressive improvements in glucose homeostasis. Therefore, when accompanied by greater weight loss, the metabolic benefits following bariatric surgery are generally more pronounced than those achieved following lifestyle and medical treatment. In addition, the mechanisms by which bariatric operations improve diabetes may include both weight-dependent and weight-independent mechanisms, and the latter may involve changes in gut hormones, bile acids, or gut microflora.