In Islam, a Muslim is strongly exhorted to safeguard his/her chastity and this, of course, includes preserving one’s virginity before marriage. In general, masturbation does not violate virginity. However, if practiced by a woman, it may result in losing her hymen, which could be of serious psychological and social consequences.

Giving a detailed explanation to this issue, Dr. Hatem Al-Haj, Professor of Fiqh, said:

Yes, they are chaste, and the virgin is still a virgin. Masturbation is detestable unless one is about to fall into zina (unlawful sexual intercourse).
For a woman, there are two ways of reaching climax with masturbation: clitoral and vaginal. A virgin may not masturbate by introducing objects into the vagina, for that would result in obvious harm. Were she  have done so and the masturbation resulted in the loss of her hymen, she would need to inform any potential husband of that and let him choose for himself. Even if the loss of her hymen was not a result of sexual involvement with a partner and therefore she would still be considered a virgin, she should be up-front with him as a matter of honesty, in order to avoid any potential future harm.