The ability to learn continuously to become more and more knowledgeable is one of the hallmarks of human intelligence. This ability is also necessary for AI agents. However, existing machine learning algorithms are still unable to do that. This talk is about the topic of continual learning, which aims to learn a sequence of tasks incrementally. A challenging setting of continual learning is class incremental learning (CIL). This talk first motivates this research and then presents a theoretical study on (1) the learnability of CIL and (2) how to solve the CIL problem in a principled manner. The key theoretical results are: (1) CIL is learnable and (2) the necessary and sufficient conditions for solving CIL are good within-task prediction and good out-of-distribution (OOD) detection. Based on the theory, several CIL methods have been designed, which have produced state-of-the-art results.