Diabetes is caused by either a decrease in production (type 1 or juvenile diabetes) of the hormone insulin or the body becoming insensitive to it over time (type 2 or adult-onset diabetes). Insulin causes sugar to be transferred from the blood to the cells of the body. Even though there is a lot of sugar in the blood, without the signal from insulin, it does not get into the cells so the body's tissues are starving. In addition, the sugar in the blood exceeds the amount which the kidneys can re-absorb when they filter the blood to make urine. So the sugar gets urinated out instead of going into the tissues. The other problem is that the excess sugar in the urine pulls water into the urine along with it. That causes dehydration which can lead to further weight loss. So basically, sugar normally goes from the digestive tract to the blood to the cell to make energy. In diabetes, it goes from the digestive tract to the blood to the urine leading to starvation despite all the sugar in the blood.