Allah subhanahu wa ta'ala says:
"And come not near to the unlawful sexual intercourse. Verily, it is a fahishah (i.e. anything that transgresses its limits (a great sin)), and an evil way (that leads one to Hell unless Allah forgives him)." [Al-Qur'an 17:32]
"The woman and the man guilty of illegal sexual intercourse, flog each of them with a hundred stripes. Let not pity withhold you in their case, in a punishment prescribed by Allah, if you believe in Allah and the Last Day. And let a party of the believers witness their punishment." [Al-Qur'an 24:2]
The Jurists say that the last verse quoted above is the punishment for fornicators who have never been married. If a person was ever married before committing the crime of zina (illegal sexual intercourse), he or she is to be punished by stoning to death. This is established by the practise of the Prophet sallallahu 'alayhi wa sallam. If they are not punished in this world and die without repentance (by regretting, leaving the sin, and so forth), they will be punished in the Fire with whips of fire.
In a tradition transmitted by Bukhari, on the authority of Samurah ibn Jundab radiallahu 'anhu, concerning a dream of the Prophet sallallahu 'alayhi wa sallam in which the Prophet sallallahu 'alayhi wa sallam was accompanied by Jibril 'alayhis salam and Mika'il, the Prophet sallallahu 'alayhi wa sallam said, "We went on and arrived near a pit which was like an oven, out of which we could hear cries. We glanced into it and saw naked men and women, who cried out when the flames reached them from below." I asked, 'Who are these, O Jibril?' He replied, 'Males and females who have committed fornication.' " [vol. 9, p. 138, no. 171]
In explaining the meaning of the verse concerning Hell:
"It has seven gates, for each of those gates is a (special) class (of sinners) assigned." [Al-Qur'an 15:44]
'Ata says, "The most severe of these gates in terms of heat, pain, sorrow, and stinking air is the gate for the doers of fornication, who did it (even) after knowing the awfulness of it."