Virginity

What counts as losing your virginity? Is it when the thingy physically was broken or is it the first time you choose to have sex?