Narrated Ibn 'Abbas (r.a.):
When the Prophet (s.a.w.) came to Medina, he found (the Jews) fasting on the day of 'Ashura' (i.e. 10th of Muharram). They used to say: "This is a great day on which Allah saved Moses and drowned the folk of Pharaoh. Moses observed the fast on this day, as a sign of gratitude to Allah." The Prophet (s.a.w.) said, "I am closer to Moses than they." So, he observed the fast (on that day) and ordered the Muslims to fast on it. (Sahih Bukhari Book #55, Hadith #609)
Mu’awiyah ibn Abu Sufyan (r.a.) relates: I heard the Messenger of Allah (s.a.w.) say: "It is the day of ‘Ashura. Allah (s.w.t.) has not made fasting obligatory for you. But I am fasting. He who likes to observe fast among you should do so, and he who likes not to observe it (does not have to) observe it." (Sahih Muslim)
Abu Qatada (r.a) relates that the Messenger of Allah (s.a.w.) said that the fast on the 10th of Muharram atones for the sins of the preceding year. (Sahih Muslim)
It is best to fast on the 9th and 10th of Muharram or the 10th and 11th because the Jewish people used to fast on the 10th and Allah's Messenger (s.a.w.) said:
"Observe the fast of Ashura and oppose the Jews. Fast a day before it or a day after." (Baihaqi)
Ibn Abbas (r.a.) said:
"When Rasulullaah (s.a.w.) observed the fast of the day of Ashura and ordered (his Companions) to fast, they said: `O Rasulullaah! It is a day revered (glorified) by the Jews and Christians.' Thereupon Rasulullaah (s.a.w.) said: "The coming year, if Allah wills (I remain alive), I will for surely fast on the ninth (also)." (Muslim)