Are you speaking of the pearl that was dropped in the cup by the king, Claudius? In Act 5, Scene 2, Hamlet is about to fight a duel with Laertes, the son of Polonius. Hamlet has killed Polonius by mistake, so Laertes has challenged Hamlet to a duel.
The king, Claudius, orders goblets of wine set on the table and says that if Hamlet wins the first or second bout, he (the king) will drink to Hamlet's health and throw a valuable pearl in Hamlet's cup. This pearl, however, has been dipped in poison, so that it will poison the wine. Although he doesn't know it, Hamlet is trapped. If Laertes' does not kill him, the King's poisoned wine will because he (Hamlet) will drink the wine, and be poisoned by the pearl.
Read about the play here on eNotes.
In the last scene of the play Claudius wishes to eliminate Hamlet. He has given a poisoned sword to Laertes so that Laertes could kill him and avenge Ophelia's death. At the same time to make doubly sure that Hamlet is killed he also poisons a cup of wine to be offered to Hamlet. The poison is contained in the pearl and it is dissolved in the cup of wine meant for Hamlet.