By balancing the emission of Insulin and Glucagon and the sugar stored in the liver and muscles.
Maintaining the sugar level in our blood is an essential task for our organism. When it is too high (as it often happens in diabetics, or after a sugar-rich meal), the pancreas releases insulin , which causes the blood sugar to be stored in our liver and muscles in the form of glycogen. If the sugar level is too low (as when we practice exercises or starve), the pancreas releases glucagon, which breaks down glycogen stored in the muscles and the liver, turning them into glucose, which is available for use in almost every cell.
Here's a helpful diagram showing the balancing act between insulin and glucagon and how they work to maintain blood sugar homeostasis: