There are certain people's attitudes in life that lie in one extreme or the other. Certain people are very moral and others are not. Hamlet's attitude about life is very sexually perverted, while Don Quixote's attitude is very chaste and idealistic and moral.
Hamlet's perverse attitude begins with his mother. He views Gertrude and Claudius's marriage as "incestuous". Hamlet over exaggerates the time between his father's death and his mother's new marriage. He even says to her on the subject, "Nay, but to live in the rank sweat of an enseamed bed, stewed in corruption, honeying and making love over the nasty sty!" (pg. 175) To say anything to one's mother about her sex life is extremely perverted. Hamlet also says her that her marriage "Call virtue hypocrite, takes off the rose from the fair forehead of innocence love and sets blisters there, make marriage vows as false as dicers' oaths." (pg 171) When he says "dicers oaths" he calls his mother, the queen of Denmark, a term reserved for whores. Hamlet wants to control his mother and when realizes he cannot he says "Good night: but go not to mine uncle's bed; assume a virtue, if you have it not. (Pg 173) This attitude continues with Ophelia.
Hamlet makes sexual innuendos constantly toward Ophelia. For example he says to her "Get thee to a nunnery." This may seems on the surface like good sound advice, but Hamlet is using the word nunnery as a pun for the word brothel. This is typical Hamlet to say one thing but mean another. He is really calling Ophelia a slut. In another sequence Hamlet says to Ophelia "I have heard of your paintings too, well enough; God has given you one face, and you make yourselves another: you jig, you amble, and you lisp, and nick-name God's creatures and make your wantonness your ignorance." (Pg 133) Hamlet tells Ophelia that she is two-faced and that she uses ignorance as an excuse to be immoral. Shortly after that he kills Polonius in sort of twisted sexual way I believe he kills him not because of the father image but so he can have Ophelia.