Pain during sex, also known as dyspareunia, can be caused by various factors, including infections, hormonal changes, or psychological issues. It’s important to consult a doctor to determine the underlying cause and explore appropriate treatment options.