Sayyiduna Abu Sa'id al-Khudri (may Allah be pleased with him) heard the Messenger of Allah (peace and blessings be upon him) saying: "The five prayers are an expiation for (the sins committed) between them." And the Messenger of Allah (peace and blessings be upon him) said: "What do you think: if a man had five rivers between his house and his place of work, and when he went to his work he did whatever Allah willed, and then dirt or sweat got on him, and every time he passed by a river he bathed, would his dirt not be cleansed away? Such are the prayers: whenever someone commits a sin, or whatever Allah wills, and then prays a prayer and seeks forgiveness, what came before it is forgiven for him."
Hadith Referenceالمعجم الكبير للطبراني / باب السين / 5425