Diabetes is a disease of glucose metabolism. Too much glucose in the blood acts as a toxin that damages small and large blood vessels. Disorders of insulin function cause this. Insulin is the hormone that stores glucose in muscle cells.
If you exercise sufficiently well, you can put glucose away in storage or use it up so that your blood glucose levels are not as high. This is useful in preventing and managing diabetes.
Both aerobic exercise (cardio) and resistance exercise (weight training) can help lower blood glucose and also improve the way insulin and glucose storage mechanisms work.
Doing a combo of both cardio and strength training might just be ideal to prevent and manage type 2 diabetes. You can do it at a gym or at home.