“I heard the Messenger of Allah, may Allah bless him and grant him peace, say, ‘What do you think would happen if there was a river by someone’s door in which he washed five times every day? Do you think that any dirt would remain on him?’ They said, ‘Not a scrap of dirt would remain on him.’ He said, ‘That is a metaphor of the five prayers by which Allah wipes out wrong actions.'”
The Messenger of Allah (may Allah bless him and grant him peace) said:
“The observance of three days’ fast every Month and that of Ramadan every year is a perpetual fasting. I seek from Allah that fasting on the day of ‘Arafa may atone for the sins of the preceding and the coming years. and I seek from Allah that fasting on the day of ‘Ashura may atone for the sins of the preceding year.”
[Taken from a longer hadith related in Sahih Muslim]
The people used to fast on ‘ashura (the tenth of Muharram) before the fasting of Ramadan was made obligatory. And on that day the Ka’ba used to be covered with a cover. When Allah made the fasting of the month of Ramadan compulsory, Allah’s Apostle said, “Whoever wishes to fast (on the day of ‘ashura’) may do so; and whoever wishes to leave it can do so.”