How can exercise help prevent diabetes?

How can exercise help prevent diabetes?