A double entendre is a form of figurative language in which a given phrase of words can be interpreted as having more than one meaning, usually the second meaning is sexually suggestive. Double entendres are similar to puns in that both are forms of word play. The main difference is that a pun is a play on a single word rather than an entire phrase. However, a double entendre can certainly make use of a pun in the phrase in order to create the double meaning. A few examples of double entendres in Twelfth Night can be found in Act 1, Scene 3 in the conversation between Maria and Sirs Toby and Andrew.
Sir Toby invites Sir Andrew to greet Maria by making a sexual pun out of the word "accost," as we see in his line, "Accost, Sir Andrew, accost" (I.iii.44). The word accost can refer to a greeting, but it's primary definition refers to being confronted in an offending way, especially confronted for "sexual purposes" (Random House Dictionary). Hence, Sir Toby's sexual pun begins a series of other sexual double entendres.
One double entendre is seen in another thing Sir Toby says to Sir Andrew, that if he lets Maria go, he hopes Sir Andrew "mightst never draw sword again" (56-57). Literally, the line refers to the fact that Sir Andrew is a knight and is trained in sword fighting; however, figuratively, the phrase also has sexual connotations referring to erections.
A second double entendre can be seen in what Maria says to Sir Andrew when she shakes his hand. She says of his hand, "It's dry, sir" (67). Literally, this line simply means his hand is dry, but the phrase also contains a double meaning in that "in Shakespeare's time, a person with a dry hand was believed to be impotent" (eNotes). Hence, this line is a continuation of the sexual pun Sir Toby created with the word accost; it is also serving as a rejection.
A double entendre is usually a phrase which has one obvious, straightforward meaning and a second meaning which is usually ironic and often risque (e.g.pertaining to sexual organs, bodily functions etc.)
In Twelfth Night the double entendres come from the mouths of characters like Maria and Sir Toby:
Sir Toby says of Sir Andrew Aguecheek's dull, lank hair "it hangs like flax on a distaff; and I hope to see a housewife take thee between her legs and spin it off;" - sexual innuendo
In Act 3:4 there are double entendres relating to swords and sheaths
"therefore, on, or strip your sword stark naked; for meddle you must, that's certain, or forswear to wear iron about you.
"I'll ride your horse as well as I ride you." Act 3:4