Hazrat Abu Hurairah (may Allah be pleased with him) narrated from the Noble Prophet (peace and blessings be upon him) that Allah Almighty has written for every human being his share of adultery, which he will inevitably encounter. Thus, the adultery of the eye is looking, the adultery of the tongue is speaking, the adultery of the heart is wishing and desiring, then the private part either confirms that desire or denies it.
Hadith Referenceاللؤلؤ والمرجان / كتاب القدر / 1701
Hadith Gradingمحدثین:«صحیح»
Hadith Takhrij«صحیح، أخرجه البخاري في: 79 كتاب الاستئذان: 12 باب زنا الجوارح دون الفرج»
Brief Explanation
The meaning is that the desire for adultery (zina) arises in the self. Now, if one commits adultery with the private part, then the sin of adultery is recorded. And if one refrains from adultery out of fear of Allah, then the desire becomes invalid and false. In this case, forgiveness will be granted. (Raaz)