Srimad-Bhagavatam: Canto 5 - Chapter 1 - Verse 20
यस्त्विह वा अगम्यां स्त्रियमगम्यं वा पुरुषं योषिदभिगच्छति तावमुत्र कशया ताडयन्तस्तिग्मया सूर्म्या लोहमय्या पुरुषमालिङ्गयन्ति स्त्रियं च पुरुषरूपया सूर्म्या ॥ २० ॥
yas tv iha vā agamyāṁ striyam agamyaṁ vā puruṣaṁ yoṣid abhigacchati tāv amutra kaśayā tāḍayantas tigmayā sūrmyā lohamayyā puruṣam āliṅgayanti striyaṁ ca puruṣa-rūpayā sūrmyā.
A man or woman who indulges in sexual intercourse with an unworthy member of the opposite sex is punished after death by the assistants of Yamarāja in the hell known as Taptasūrmi. There such men and women are beaten with whips. The man is forced to embrace a red-hot iron form of a woman, and the woman is forced to embrace a similar form of a man. Such is the punishment for illicit sex.
Generally a man should not have sexual relations with any woman other than his wife. According to Vedic principles, the wife of another man is considered one’s mother, and sexual relations are strictly forbidden with one’s mother, sister and daughter. If one indulges in illicit sexual relations with another man’s wife, that activity is considered identical with having sex with one’s mother. This act is most sinful. The same principle holds for a woman also; if she enjoys sex with a man other than her husband, the act is tantamount to having sexual relations with her father or son. Illicit sex life is always forbidden, and any man or woman who indulges in it is punished in the manner described in this verse.