The joke is a play on words.  'Leaving' means to exit or go somewhere else, and the word sounds like 'leaves' as in the green parts of most plants and trees.  The word 'leaving' was replaced with 'leafing' because they are talking about trees.
John plans to retire in the spring and , like the trees around us , will be leafing .