I'm assuming that you are refering to Ophelia? She goes mad because of the treatment she receives from Hamlet. He is very abusive toward her by stating that he never loved her, he questions her virginity, calls her a whore in so many words. He responds to her with anger and sexually offensive remarks when she attempts simple conversation, like during "the mousetrap" scene.
Ophelia is usually seen as a weak character and is easliy ordered around and walked over by the men in her life. Hamlet is the most obvious abser, but her father defintely plays a part in her madness. He manipulates her to spy on Hamlet, even though she loves Hamlet and doesn't want to hurt him.
Ophelia's treatment at the hands of Hamlet, in particular, his rejection may have contributed to her madness. However, Hamlet cannot help but allude to his real feelings in the nunnery discussion and in fact tells her, "I did love thee once", only changing his mind because he either realises that Polonius and Claudius were watching or because he knows he has to convince her he is mad to save her life (by alienating her).
The biggest cause of Ophelia's descent into madness is the violent death of her father at the hands of her erstwhile lover Hamlet