The pancreas has two main functions: an exocrine function that helps in digestion and an endocrine function that regulates blood sugar.