In order to be deployed long-term in the real world, machine learning systems must be able to handle the one thing that is constant: change. Traditional machine learning focuses on stationary tasks, and is therefore incapable of adapting to change. Instead, we need lifelong learners that can accumulate knowledge that enables them to rapidly adjust to new tasks. Ideally, pieces of this accumulated knowledge could be composed in different ways to adapt to the shifting environment. This capability would dramatically improve the performance of machine learning systems in dynamic environments: hate-speech detection models could adapt to social media trends, search-and-rescue robots could handle novel disasters, and student feedback software could adjust to new cohorts. My research develops algorithms for lifelong or continual learning that leverage the intuition that accumulated knowledge should be compositional. In this talk, I will walk through the lifelong learning problem and motivate the search for compositional knowledge. My talk will then dive into some of the algorithms that I have developed for lifelong supervised and reinforcement learning, and I will show that these methods enable far improved lifelong learning in settings where tasks are highly diverse. I will finally briefly discuss some of the open problems in the field and describe my vision for how my future research will address these problems.