Full Sharh — Riyad as-Salihin 365
وعن ابن مسعود رضي الله عنه أن رجلا أصاب من امرأة قُبلةً، فأتى النبي صلى الله عليه وسلم فأخبره فأنزل الله تعالى: {أقم الصلاة طرفي النهار وزلفًا من الليل، إن الحسنات يذهبن السيئات} فقال الرجل: ألي هذا؟ قال: "لجميع أمتي كلهم" ((متفق عليه)).
English Translation
Ibn Mas'ud (May Allah be pleased with him) reported:: A man kissed a woman. So he came to the Messenger of Allah (ﷺ) and informed him about it. Then Allah revealed this Ayah: "And perform the Salat, between the two ends of the day and in some hours of the night. Verily, the good deeds efface the evil deeds (i.e., minor sins)." (11:114) The man asked the Messenger of Allah (ﷺ) whether this applies to him only. The Messenger of Allah (ﷺ) said, "It applies to all of my Ummah.".
Source
Riyad as-Salihin(رياض الصالحين)
The Book of Virtues
Hadith Number
365