Double entendres and puns are both figures of speech that involve ambiguity and double meanings. However, they are not exactly the same.
A double entendre uses a word that seems innocuous at the surface level but also carries a second meaning that would be too inappropriate or sexually suggestive to state directly.
On the other hand, a pun also exploits two possible interpretations of a word, but it is usually in a clever or humorous way, without any suggestive meaning.
In short, a double entendre may use a pun. However, not all puns are considered double entendres.