What does an Artificial pancreas do?

A basic story about how diabetes works and what an artificial pancreas does.