@Nurse_Nettie might be able to offer some more insight here but I think the tightening of muscles or spasms is common for women when orgasming and it can occur at very different levels of intensity. Perhaps slowing down the movement/penetration and stimulation might help in reaching orgasm and reduce her discomfort. Its a tricky one!
Thanks for tagging me in @CloakOfAsh. @curious It sounds like your friend might have experienced vaginismus. This is an involuntary (uncontrollable) spasm of vaginal muscles. It can be triggered by physical pain/discomfort or psychological cues like anxiety. Lots of women will experience it at some point in their life. If it starts to happen regularly then it’s probably worth seeing a doctor at Family Planning or a similar women’s health service for advice. Treatment is usually about relaxation techniques and practice with gentle penetration on your own. Check out this info sheet for more details 🙂