How does being overweight lead to type 2 diabetes?

How does being overweight lead to type 2 diabetes?