Whenever you eat something, your body divides the nutrients and passes them on to the bloodstream through the digestive system. The pancreas then produces insulin, in order to keep track of the blood sugar levels, which are affected by the food you just ate. When you have diabetes, the pancreas can't produce insulin and so the blood sugar levels are not regulated, causing abnormally high or low blood sugar levels.
Why do we get type 1 diabetes?
Being an autoimmune disease, the immune system gets its signals crossed and thinks that the cells in the pancreas are infected or harmful, and attacks them. Unfortunately the reason for this still needs to be discovered. Research points towards a viral infection, but it has not been proven yet. Type 1 diabetes is also commonly inherited and if you have a close relative with the condition, you have a 6% chance of also developing the condition, whereas people with no close relatives with the condition have less than a 0.5 risk of developing it.