The two main stability results for nearly-integrable Hamiltonian systems are revisited: Nekhoroshev theorem, concerning exponential lower bounds for the stability time (effective stability), and KAM theorem, concerning the preservation of a majority of the nonresonant invariant tori (perpetual stability). To stress the relationship between both theorems, a common approach is given to their proo...