Good question! The answer is, by a negative feedback loop (basically when the body reacts to counteract a change induced). So, the level of glucose in your blood normally is called your fasting glucose (without addition of food). When you eat, the levels of glucose in your blood spikes. In a normal person, this triggers the beta cells in your pancreas to secrete insulin, (won't go into too much detail here), which basically brings the levels of glucose back down. If your blood glucose is too low alpha cells in the pancreas are triggered to secrete more glucagon which brings blood sugar levels back up.
In a diabetic, depending on whether you have type one or two, you either can't produce insulin or it doesn't work the way it should. This means you can't bring your blood glucose levels back down, which is why you may need to take insulin directly to stimulate this process.