In William Shakespeare's Hamlet, Polonius is the father of Laertes and Ophelia and serves as an advisor to King Claudius, who became king after killing his brother, who was Hamlet's father.
His first appearance come in Act 1, Scene 2, Polonius assist Claudius by giving Laertes permission to return to France.
In the next scene, Polonius provides advice to this children. We see him again in Act 2, Scene 1, where he hears about Hamlet's strange behavior towards his daughter Ophelia.
In Act 2, Scene 2, Polonius informs King Claudius of his suspicion that Hamlet's madness is a result of Hamlet being lovesick over Ophelia. Polonius sets up a situation in which he and Claudius will listen in on a conversation between Ophelia and Hamlet, which will allow Polonius to prove his theory about Hamlet. In the opening scene of Act 3, this eavesdropping takes place, but Claudius is not convinced of Polonius' theory. Still, Polonius wants to try one more instance of eavesdropping (Gertrude will question Hamlet) before they follow Claudius' plan of sending Hamlet off to England.
After the play in which Claudius' crimes are hinted at, Claudius is even more determined to send Hamlet away. Again, Polonius promises the King he will listen in on the conversation between Hamlet and his mother Gertrude.
Unfortunately, this eavesdropping brings about Polonius' death as Hamlet thinks Claudius is hiding behind a curtain and stabs through the curtain only to discover Claudius (Act 3, Scene 4).
Thus, in Hamlet, Polonius' main function is to serve as an advisor to Claudius and try to help him understand the cause of Hamlet's actions.