Investigating Continual Pretraining in Large Language Models: Insights and Implications