Insulin is produced by β-cells of the islets of Langerhans of the pancreas primarily in response to glucose.

Insulin has several roles: it stimulates glucose glucose uptake into the cells and enables glucose storage in muscle and liver in the form of glycogen; it regulates blood sugar levels by inhibiting liver glucose production and stimulates synthesis of fat and muscle. It inhibits the breakdown of lipids, proteins and glycogen and inhibits the glucose pathway (gluconeogenesis) and production of ketone bodies (ketogenesis).

Type 1 diabetes is the result of the body producing insufficient insulin to regulate blood glucose levels.

Type 2 diabetes is caused by the body not responding effectively to insulin. This is termed insulin resistance.