Insulin is a hormone that is secreted by the pancreas in response to in the blood. More specifically, they are produced by beta-cells which are found in an area of the pancreas called the Islets of Langerhans.
When blood glucose levels go above a set point (90mg/100ml), for example after eating carbohydrates, the beta-cells detect this and release insulin into the blood circulation.
Insulin acts on tissues in the body, especially the liver, muscles and fat (adipose tissue), and causes them to take up glucose. After glucose enters the cell, it is converted into glycogen (a process called glycogenesis) and stored.
A low blood glucose level, for example during exercise or fasting, causes glycogen to be broken down back into glucose (glycogenolysis).