Praise be to Allah.
Zinaa, in Arabic, means immorality, and is used with two meanings in shar: a general meaning and a specific meaning.
The general meaning includes that which carries the punishment (hadd) and that which does not carry it. Islam does not give the name of zinaa only to that which carries the punishment, which is just one of many types of zinaa. Ibn Abbaas (may Allaah be pleased with them both) said: I have never heard any better definition of small faults [al-Najm 53:32] than that which Abu Hurayrah (may Allaah be pleased with him) narrated from the Prophet (peace and blessings of Allaah be upon him): Allaah has decreed for every son of Adam his share of zinaa, and there is no way to escape from it. The zinaa of the eye is a glance, the zinaa of the tongue is speaking, and the zinaa of the mind is wishing and hoping; then the private part either acts upon this or it does not. (Reported by al-Bukhaari, 11/26; Muslim, 4/2046).
Al-Bukhaari included this hadeeth in a chapter entitled Baab zinaa al-jawaarih doon al-farj (Chapter on the zinaa of faculties other than the private part).
Al-Haafiz Ibn Hajar (may Allaah have mercy on him) said: Zinaa is not always associated with the private part itself, but may involve other faculties such as the eyes and so on. Ibn Battaal (may Allaah have mercy on him) said: Looking and speaking are called zinaa because they lead to real zinaa. This is why he said that the private part either acts upon this or it does not
Zinaa is one of the forbidden deeds, one of the most serious major sins (kabaair) after shirk and murder. Allaah says (interpretation of the meanings):
And those who invoke not any other god along with Allaah, nor kill such life as Allaah has forbidden, except for just cause, nor commit illegal sexual intercourse and whoever does this shall receive the punishment. The torment will be doubled to him on the Day of Resurrection, and he will abide therein in disgrace; except those who repent and believe and do righteous deeds, for those Allaah will change their sins into good deeds, and Allaah is Oft-Forgiving, Most Merciful. [al-Furqaan 25:68-70]
And come not near to unlawful sexual intercourse. Verily, it is a faahishah [anything that transgresses its limits a great sin], and an evil way (that leads one to Hell unless Allaah forgives him). [al-Isra 17:32]
Imaam al-Qurtubi (may Allaah have mercy on him) said: The ulama said that the phrase And come not near to unlawful sexual intercourse is more eloquent than merely saying Do not commit zinaa, because the meaning is, Do not even come close to zinaa. This means not doing any deed that may get close to zinaa or lead to it, such as being alone with a member of the opposite sex, touching, looking, going to evil places, speaking in a haraam manner to a woman to whom one is not related, thinking about and planning immoral acts, and so on.
Abd-Allaah ibn Masood said: I asked the Messenger of Allaah (peace and blessings of Allaah be upon him), Which sin is worst in the sight of Allaah? He said, To make any rival to Allaah, when He has created you. I asked, Then what? He said, To kill your child for fear that he will eat with you. I asked, Then what? He said, To commit zinaa with the wife of your neighbour. (Reported by al-Bukhaari, 8/492; Muslim, 1/90).
All religions are agreed that zinaa is haraam; no religion allows it. The punishment for zinaa is the most severe of punishments, because it violates peoples honour and lineages.
The sin of zinaa may be of varying degrees, and the gravity of the offence depends on the nature and circumstances of the deed, although all zinaa is haraam, a major sin and an act of immorality. Zinaa with a mahram [i.e., incest] (Allaah forbid) or with a married woman is far worse than zinaa with a woman to whom one is not related or with an unmarried woman, because it involves violating the rights of the husband, contaminating his bed, attributing a child to him that is not his, and other kinds of offence and harm. If her husband is a neighbour, the crime of being a bad neighbour is added to the offence; if her husband is one's brother or relative, the crime of breaking family ties is added. The Prophet (peace and blessings of Allaah be upon him) said: He will not enter Paradise whose neighbour is not safe from his evil actions. (Reported by Muslim, 1/68). There is no evil action worse than zinaa, and if the husband is absent for the sake of Allaah, such as in worship, seeking knowledge or jihaad, then the sin is compounded. Buraydah (may Allaah be pleased with him) reported that the Prophet (peace and blessings of Allaah be upon him) said: The wives of the mujaahideen are as sacred and forbidden to those who stay behind as their own mothers. There is no man of those who stay behind who is entrusted by one of the mujaahideen with the care of his family and then betrays him (by committing zinaa), but he will be detained on the Day of Resurrection, and (the one whom he betrayed) will take as much of his good deeds as he wishes. So what do you think? (Reported by Muslim, 3515). If the adulterer is married, the sin is greater, and the punishment is stoning, and if he is an old man, the sin is greater and the punishment is as the Prophet (peace and blessings of Allaah be upon him) mentioned in the hadeeth about the three whom Allaah will neither look at nor praise on the Day of Resurrection, and who will have a painful punishment. (Saheeh Muslim, 156). If the deed is also committed during a sacred month or in a sacred place or at a time which is special in the sight of Allaah, the sin is compounded.
The fuqaha (may Allaah have mercy on them) stated that the basic act of zinaa which carries the punishment is illegal sexual intercourse, whereby the two circumcised parts [i.e. genitals] come together and there is penetration of the tip of the penis, because this is actual penetration (which carries the prescribed hadd or punishment).
A person must avoid evil deeds and everything that can lead to them. Allaah has commanded us to avoid the traps of the Shaytaan, because if a man takes one step in that direction, his shaytaan and his own ego (nafs) will keep urging him to do evil until he commits immoral deeds.
One should think about how serious it is to touch a woman to whom one is not related, as the Prophet (peace and blessings of Allaah be upon him) explained: If one of you were to be stabbed in the head with a piece of iron it would be better for him than if he were to touch a woman whom it is not permissible for him to touch. (Reported by al-Tabaraani; see also Saheeh al-Jaami, 5045). This refers to the punishment for touching, so how about worse deeds, such as embracing and kissing, and even worse kinds of illicit activity? The Muslim qaadi is empowered to stipulate an appropriate punishment for every proven action other than actual intercourse; in the case of intercourse, the punishment set out by Islam is one hundred lashes and a years exile for one who is unmarried, and stoning for one who is married. This is the punishment in this world, and the punishment in the Hereafter is far more severe.
One of the important principles which the salaf (may Allaah have mercy on them) pointed out is that the sincere believer who truly hopes for Allaah and the Hereafter should not look at whether the sin is major or minor, or whether is carries a punishment (hadd) or not. It was reported that Ibn Abbaas (may Allaah be pleased with them both) said: There is no major sin if one asks for forgiveness, and there is no minor sin if one persists in repeating it. Someone else said: If you want to disobey Allaah, do not think about the smallness of the sin, think about the greatness of the One Whom you are disobeying.
With regard to the matter of repentance from zinaa, please refer to the book "I Want to Repent, But...", , under the heading Books on this website. May Allaah bless our Prophet Muhammad.