Ophelia was very sheltered from the ways of the world by both her father and her brother. Hamlet had been in love with her because of her purity, innocence, and virtue but when she accepts her father's bidding above his (which, in the time period this was written was the proper thing to do unless Hamlet was her husband which he was not), he takes out all his mommy issues on her and calls her a whore to her face among other things.
This is of course devastating to her because she was very much in love with him and couldn't figure out why he would suddenly turn on her in such a terrible way, but she still defends him and loves him even during this. We can see how painful it was for her in this exchange:
Hamlet: ...I did love you once.
Ophelia: Indeed, my, lord, you made me believe so.
Hamlet: You should not have believed me...I loved you not.
Ophelia: I was the more deceived.
When Hamlet kills her father, she doesn't seem able to handle that Hamlet has not been kind to her family (including herself), but too fragile to stop loving him or join in the plotting, she instead loses her mind and drowns (whether it was suicide or not is up for interpretation).
Agreed. There is some textual evidence that Hamlet knew Ophelia in the biblical sense, and she suspects that is the reason that he has lost interest in her: she has forfeited all the qualities listed above, such as innocence and virtuousness.
Ophelia is also not very observant; when Hamlet leaves her in III.i, he walks without once looking where he is going; this is a clearly practiced move. But Ophelia is too distraught by this utter rejection to ponder the meaning behind Halmet's words and deeds.