In many religions, including Islam, it is a great sin to kill/excecute a virgin. This became law in Iran after the revolution. This acts as a protection for the girl therefore a Guardian of the Revolution marries her and takes her virginity away from her, usually by rape. Now that she is no longer a virgin, she can be executed. The Guardian of the Revolution pays the family a dowry for the girl's death. In Persepolis, the Guardians only payed 500 tumans to Niloufar's family; which at the time was equivalent to 5 US dollars.

To be a virgin is when a man or a woman does not engage in any sexual actions, loosely meaning vaginal sex but can be considered any type of sexual interaction between a couple. Once one has had sex they are no longer considered a virgin due to the sexual incounter.

Virginity is the state of being a virgin (never had vaginal intercourse). viginity
Virginity

The best/easiest way to remain a virgin is to practice abstinence. Abstinence means to restrain from desires, especially physical ones. If a girl chooses to loose her virginity but does not want to become pregnant, she could take a pill or a shot or use other various methods.