abstract: In this talk we intend to clarify the intimate relations between Lyapunov functions and recurrent sets. The study of this topic --started by Conley in the Seventies-- has had recent developments with the formalism of the weak KAM theory. We first resume the state of the art and then we present some new results, both for homeomorphisms and for flows. Moreover, we pose the following question: when the property of admitting a Lyapunov function —which is not a first integral— is stable under continuous perturbations? We explain how this problem is related to the so-called explosions of recurrent sets and we discuss some conditions which ensure that the above “stability” is verified.