It is narrated from Hazrat Abu Huraira (may Allah be pleased with him), probably as a marfu' hadith, that the eye also commits adultery and the heart also; the adultery of the eyes is looking (at what is forbidden), and the adultery of the heart is wishing and desiring, while the private part either confirms or denies it.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 8356