Living beings do an extraordinary thing. By being alive they are resisting the second law of thermodynamics. This law stipulates that open, living systems tend to dissipation by the increase of entropy or chaos. From minimal cognitive organisms like plants to more complex organisms equipped with nervous systems, all living systems adjust and adapt to their environments, thereby resisting the second law. Impressively, while all animals cognitively enact and survive their local environments, more complex systems do so also by actively constructing their local environments, thereby not only defying the second law, but also (evolution) selective properties. Because all living beings defy the second law by adjusting and engaging with the environment, a prominent question is how do living organisms persist while engaging in adaptive exchanges with their complex environments? In this talk I will offer an overview of how the Free Energy Principle (FEP) offers a principled solution to this problem. The FEP prescribes that living systems maintain themselves by remaining in non-equilibrium steady states by restricting themselves to a limited number of states; it has been widely applied to explain neurocognitive function and embodied action, develop artificial intelligence and inspire psychopathology models.