A pun is when a word sounds like another word and is then put in the place of it, specific type of play on words

Double entandre is when the word has two meanings and both meanings come into play, making the sentence able to be interpreted two ways (in a sense)