The “trick” of how creatures learn and interact with the world, according to the book, is guessing what the next sensory stimulation will be and using that prediction error as a method to drive learning. The prediction described here is low-level and automatic, but occurs in hierarchical units that eventually build up to higher level concepts that pull in symbolic knowledge (e.g. I predict the cup will feel hot because I have a higher level model of coffee and heat conduction). We can learn about the world by attempting to generate incoming sensory data for ourselves. Actions are also a part of the loop, ways that we can bring our predictions to fruition. As we learn more about the world, our predictions become more accurate.
This is closely related to the Bayesian brain hypothesis; that our brain implements some approximation of Bayesian update to weigh new evidence and judge what the likeliest scenario is. Thus this model contains both prediction mechanisms and mechanisms to estimate the reliability of those predictions.