A good place to start your research to answer this question is Ophelia's soliloquy in Act 3, scene 1: "O, what a noble mind is here o'erthrown!"
This is the only time we are allowed to know Ophelia's thoughts, and this soliloquy occurs just after Ophelia and Hamlet interact on stage for the first time in the play. In this speech, Ophelia does not react angrily at Hamlet's cruel treatment of her. Instead, she seems intensely empathetic and aware that great changes have taken place in him. I do not believe that she is completely fooled by Hamlet's act of insanity, even though she has loyally reported such actions to her father. But I do think it clear that she is aware that the Hamlet she once knew is no longer.
In this soliloquy, she shows what Hamlet's potential was--the Hamlet she had fallen in love with. She despairs now, though, in that he has lost his "noble mind" and that his reason is "blasted with ecstasy."
Hamlet has not told Ophelia of his mission to avenge his father's death. He could not. Ophelia would have dutifully reported this plan to her father, who would have gone to the king. But Ophelia is sensitive enough to know that Hamlet is deeply troubled and that their relationship is essentially over. She prays to the heavens to restore him. But deep down, she probably has no true hope that their relationship could ever be renewed. She is deeply hurt, helpless, and lost. Hamlet's advice "Get thee to a nunnery," is most likely very sound.
Although a static character of emotional fraility and innoncence, Ophelia in Shakespeare's Hamlet displays a filial loyalty to her father Polonius and an equally intense loyalty to Hamlet, whom she loves to the end. In a haunting manner, Ophelia clings to the memory of Hamlet's love until she loses touch completely with reality as she goes mad.
When, for example, Hamlet insults Ophelia in Act III when she tries to return his presents, denying that he has given her anything and speaking of the falseness of women, with sexual insults as well. When Hamlet mocks the fact that Ophelia is sexually experienced, suggesting that she go to "a nunnery" which has the possible double meaning of a brothel, Ophelia never retorts cruelly; instead, she prays, "O, help him, you sweet heavens!" (3.1.131). As she sits by Hamlet, Ophelia refuses to reply to his cruel insults; she simply tells Hamlet during the performance of the play, "You are as good as a chorus, my lord" (3.2.224) Throughout each scene that Ophelia is with Hamlet, she displays nothing but loving kindness.