Type 2 diabetes usually develops gradually and is much less common in children and young people. It mostly affects adults over the age of 40, but it can develop at any age. It is often linked to lifestyle factors such as weight gain, lack of exercise and diet, as well as a family history of type 2 diabetes. It occurs when the body produces some, but not enough, insulin; or is resistant to insulin.