A double-entendre is a phrase or figure of speech that could be understood in two different ways.
On example is Charles Dickens character in Oliver Twist named Charley Bates but frequently referred to as Master Bates (the term masturbate was already in use when Dickens wrote Oliver Twist and had the same meaning then as it does today). There are plenty more examples of this in other literature.