An allusion is a reference to history, mythology or literature. Shakespare loved to make allusions, mostly to history and mythology. In Act II line 15-16 there are two allusions, to King Cophetua and Cupid.

Young Adam Cupid, he that shot so trim(15)

When King Cophetua lov'd the beggar maid!

He heareth not, he stirreth not, be moveth not; (lines 15-17)

As Medieval legend has it, King Cophetua saw a beggar and laid down coins to catch her, so he could marry her. Cupid is a legend we all know: his arrow supposedly made couples fall in love. Line 13 also has an allusion to Venus, the Roman love goddess.

A pun is a play on words. Shakespeare is famous for his puns. Mercutio is often the punster, such as his joke about dreamers “lying” in Act I, Scene 4. Mercutio teases Romeo:

Without his roe, like a dried herring. (line 37)

He is punning the nickname “Ro” with “roe” or fish eggs, to remind Romeo that he gave them “the slip” the night before at the party.

Signior Romeo, bon jour! There's a French salutation

to your French slop. You gave us the counterfeit

fairly last night.(45) (lines 43-45)

Romeo, not in the mood for puns, asks him what he’s talking about. That's when Mercutio reminds him about "the slip."

This speech also contains more allusions: historical (Cloepatra, Dido, Helen), and literary (Petrarch).The puns contribute to the jolly, teasing mood, and the allusions allow the reader to get the context, the inside joke.