The Messenger of Allah ﷺ said, "Tell me, if there were a river at the door of one of you in which he bathed five times a day, would any dirt remain on him?"They replied, "No dirt would remain on him."He said, "That is the likeness of the five prayers. Through them Allah wipes away sins."
أخبرنا قتيبة قال حدثنا الليث عن ابن الهاد عن محمد بن إبراهيم عن أبي سلمة
أن رسول الله ﷺ قال أرأيتم لو أن نهرا بباب أحدكم يغتسل منه كل يوم خمس مرات هل يبقى من درنه شيء قالوا لا يبقى من درنه شيء قال فكذلك مثل الصلوات الخمس يمحو الله بهن الخطايا
Muslim recorded it in the Book of Mosques, chapter on walking to prayer erasing sins and raising one's status, hadith no. 667, from Qutayba, and Bukhari recorded it in the Book of Prayer Times, chapter on the five prayers being an atonement, hadith no. 528, from the hadith of Yazid bin Abdullah bin Had, with the same wording. It is also found in Al-Kubra, hadith no. 323.