Vaginismus is usually a response to past trauma(physical or psychological) or sexual abuse and the fear of getting such pain again during sexual intercourse triggers this uncontrolled involuntary spasm of vaginal muscles. Fear of getting pregnant or having reservations about sex itself could also trigger this.
Attribution: Avallain