The people used to fast on the day of 'Ashura' before fasting in Ramadan was prescribed but when (the
order of compulsory fasting in) Ramadan was revealed, it was up to one to fast on it (i.e. 'Ashura') or
not.
Sahih al-Bukhari Book 65, Hadith 29