From Wikipedia:

The act of losing one’s virginity, that is, of a first sexual experience, is commonly considered within many cultures to be an important life event and a rite of passage. The loss of virginity can be viewed as a milestone in a person’s life. In human females, the hymen is a membrane, part of the vulva, which partially occludes the entrance to the vagina, and which stretches, or is sometimes torn, when the woman first engages in sexual intercourse. It can also be broken by cycling, horseback riding, or gymnastics. The human hymen can vary widely in thickness, shape, and flexibility. Throughout history, the presence of an intact membrane has been seen by many as physical evidence of virginity in the broader technical sense. The presence of a hymen is a possible indication, but no guarantee, of virginity, given that some degree of sexual activity may occur without rupturing the hymen, the hymen may be broken through means other than sexual, and because there may exist varying definitions as to the type and extent of sexual activity that is considered by a person to terminate the state of “virginity”.   This is further complicated by the availability of hymenorrhaphy surgical procedures to repair or replace the hymen. It is a common belief that some women simply lack a hymen, but doubt has been cast on this by a recent study. In the majority of women, the hymen is sufficiently vestigial as to pose no obstruction to the entryway of the vagina. The presence of a broken hymen may therefore indicate that the vagina has been penetrated but also that it was broken via physical activity or the use of a tampon or dildo.  Many women possess such thin, fragile hymens, easily stretched and already perforated at birth, that the hymen can be broken, or merely disappear, in childhood, without the woman even being aware of it. In contrast to the common cases of an absent or partial hymen, in rare cases a woman may possess an imperforate hymen, such as prevents the release of menstrual discharge. A surgical procedure known as hymenotomy, which creates an opening in the hymen, is sometimes required to avert deleterious health effects. The playwright Ben Jonson claimed that Queen Elizabeth I of England, the Virgin Queen, had a “membranum” that made her “incapable of Man”, and that a friend of hers, a “chirurgeon”, had offered to remedy the problem with his scalpel and that Elizabeth had demurred. In males, the act of losing one’s virginity, that is, of a first sexual experience, only is a formal and conventional event for men. There is no physically indicator or organ of virginity and it only remains a colloquial term to point the absence of a complete sexual intercourse, mainly oriented to the “penetrative act”. Therefore, any “penile penetration” (anal or vaginal) towards a partner should entail, colloquially, the lost of male virginity.