A person can get diabetes through a compromised immune system, genetic precondition, environmental factors, cell-resistance to insulin and obesity, according to Mayo Clinic. Type 1 and type 2 diabetes can occur when the pancreas is not able to produce a sufficient amount of insulin, resulting in sugar accumulation in the blood.

Mayo Clinic adds that the exact cause of type 1 remains unknown, but an impacted immune system may be at play. The immune system fights and destroys cells that produce insulin in the pancreas. Exposure to a viral infection can also lead to a type 1 contraction. Family history may also be a cause, and certain ethnic groups are more prone to diabetes. Low vitamin D intake may create type 1 diabetes, although no research has indicated a direct causal connection.

According to Mayo Clinic, a person can get type 2 diabetes from excess fatty tissue, which makes the cells more resistant to insulin. High blood pressure has also been linked to type 2 diabetes. Genetic predisposition and environment are associated with type 2 diabetes in the same way as type 1. Obesity can also pave the way for diabetes, but there are people who have type 2 without being overweight. Gestational diabetes falls under type 2, and mothers are most at risk when the pancreas fails to keep up with hormones that produce insulin-resistant cells.